Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
700 stars 145 forks source link

support for python 2.6 #46

Closed mpasserini closed 9 years ago

mpasserini commented 10 years ago

Hi,

I downloaded the latest version from GIT (1.0.0), in the changelog it says that it supports 2.6:

"0.0.9

But it does not work at make install:

[root@ Multicorn]# make install Python version is 2.6 ./preflight-check.sh /bin/mkdir -p '/usr/pgsql-9.3/lib' /bin/mkdir -p '/usr/pgsql-9.3/share/extension' /bin/mkdir -p '/usr/pgsql-9.3/share/extension' /bin/mkdir -p '/usr/share/doc/pgsql/extension' /usr/bin/install -c -m 755 multicorn.so '/usr/pgsql-9.3/lib/multicorn.so' cp ./setup.py ./setup--1.0.0.py sed -i -e "s/VERSION/1.0.0-dev/g" ./setup--1.0.0.py /usr/bin/python ./setup--1.0.0.py install Traceback (most recent call last): File "./setup--1.0.0.py", line 12, in include_dirs = [get_pg_config(d) for d in ("includedir", "pkgincludedir", "includedir-server")] File "./setup--1.0.0.py", line 6, in get_pg_config r = subprocess.check_output([pg_config, '--%s' % kind]) AttributeError: 'module' object has no attribute 'check_output' make: *\ [python_code] Error 1

It's because subprocess does not contain the check_output function:

import subprocess dir(subprocess) ['CalledProcessError', 'MAXFD', 'PIPE', 'Popen', 'STDOUT', 'TimeoutExpired', '_PIPE_BUF', 'all', 'builtins', 'doc', 'file', 'name', 'package', '_active', '_cleanup', '_demo_posix', '_demo_windows', '_eintr_retry_call', '_has_poll', 'call', 'check_call', 'errno', 'fcntl', 'gc', 'list2cmdline', 'mswindows', 'os', 'pickle', 'select', 'signal', 'sys', 'time', 'traceback', 'types']

I'm trying to install it on Red Hat Enterprise Linux Server release 6.5 (Santiago)

rdunklau commented 10 years ago

Sorry, the support for Python 2.6 seems to have been dropped along the way. Given now that python2.7 has been released for close to 4 years, 2.6 support isn't likely to come back.

asya999 commented 9 years ago

You can look at my pull request #105 which adds compatibility with Python 2.6 and that allowed me to install on CentOS without any special steps.