Python3.4 detection on 9.6 configuration - Mailing list pgsql-hackers
From | Lou Picciano |
---|---|
Subject | Python3.4 detection on 9.6 configuration |
Date | |
Msg-id | 1997437432.3661037.1475068310057.JavaMail.zimbra@comcast.net Whole thread Raw |
In response to | Re: Tracking wait event for latches (Robert Haas <robertmhaas@gmail.com>) |
Responses |
Re: Python3.4 detection on 9.6 configuration
|
List | pgsql-hackers |
PostgreSQL Friends:
Trying to build 9.6RC1, with Python3.4, on OpenIndiana (Illumos). It seems the detection of shared library status of the .so has changed. This appears to be related to a different(?) elucidation of python configuration.
A 'hardwired' change to the configure script to trap platform 'solaris' will work, but this seems the inappropriate approach.
Would be happy to work through this here - I'd like to make it a small 'contribution'.
Clipped from configure script:
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
- $as_echo_n "checking how to link an embedded Python application... " >&6; }
- python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
- python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
- python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
- echo "-----"
- echo "----- LOU MOD: python_so: $python_so"
- echo "-----"
- configure finds '.so' on Python2.7
- configure finds '.cpython-34m.so' on Python3.4
- ------------- LATER in the config script, the following 'hardwired' change will 'fix' this, but is likely not the right approach:
- (our Python _is_ built as a shared lib. So, this is wonky, but it will work: )
- # We need libpython as a shared library. With Python >=2.5, we
- # check the Py_ENABLE_SHARED setting. On Debian, the setting is not
- # correct before the jessie release (http://bugs.debian.org/695979).
- # We also want to support older Python versions. So as a fallback
- # we see if there is a file that is named like a shared library.
- if test "$python_enable_shared" != 1; then
- if test "$PORTNAME" = darwin; then
- # macOS does supply a .dylib even though Py_ENABLE_SHARED does
- # not get set. The file detection logic below doesn't succeed
- # on older macOS versions, so make it explicit.
- python_enable_shared=1
- elif test "$PORTNAME" = win32; then
- # Windows also needs an explicit override.
- python_enable_shared=1
- # ----- MOD BY LOU: ----------------------------------------
- elif test "$PORTNAME" = solaris; then
- # Solaris explicit override.
- python_enable_shared=1
- else
- # We don't know the platform shared library extension here yet,
- # so we try some candidates.
- for dlsuffix in .so .sl; do
- if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
- python_enable_shared=1
- break
- fi
- done
- fi
- fi
pgsql-hackers by date: