diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2016-10-26 08:56:51 -0400 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2016-12-11 04:43:21 -0800 |
commit | 6c6c9cd284f7aaf9c07c000abc60d71013862afd (patch) | |
tree | 1c93447dbe0b9a1c5c39bc1579f64eea69513d7b /configure.ac | |
parent | 5da9c89db7626cda7c275712773a7e742f45795a (diff) |
build: python site-packages vs. dist-packages
Unlike Fedora and RHEL/CentOS, where python has
/usr/{lib,lib64}/python2.7/site-packages/..., Debian-based
distributions have /usr/lib/python2.7/dist-packages/...
On Debian our python scriptlet to determine this is broken and
incorrectly returns .../site-packages, not .../dist-packages.
Furthermore, the automake/autoconf/pkgconfig bits ahead of our
own scriptlet have already determined the correct location -- all
we need to do is use it.
This change also slightly reworks the BUILD_PYTHON_INC scriptlet
to bring it in line with the style/pattern of the other python
scriptlets provided by autoconf/pkgconfig.
(I do wonder though, why we have two sets of {C,CPP}FLAGS and
LD_FLAGS - PYTHONDEV_CPPFLAGS and BUILD_PYTHON_INC, and
PYTHONDEV_LDFLAGS and BUILD_PYTHON_LIB.
They both have very similar values, but, e.g. BUILD_PYTHON_INC
misses /usr/lib/x86_64-linux-gnu/python2.7 on Debian; even if that
ommission doesn't seem to be hurting us.)
Change-Id: I309a5c781a1d9aee4d7be2867223781bd2ae18fa
BUG: 1388861
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/15733
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index cd8f45fe8dd..28c6b5c2f25 100644 --- a/configure.ac +++ b/configure.ac @@ -531,7 +531,7 @@ fi dnl Check if version matches that we require PYTHONDEV_CPPFLAGS= -PYTHONDEV_CPPFLAGS= +PYTHONDEV_LDFLAGS= BUILD_PYTHON_SITE_PACKAGES= BUILD_PYTHON_INC= BUILD_PYTHON_LIB= @@ -552,8 +552,8 @@ if echo $PYTHON_VERSION | grep -q ^2; then dnl Find python libs at user configured libdir and also "lib" under prefix PYTHONDEV_LDFLAGS="${PYTHON_LIBS} -L`${PYTHON}-config --prefix`/lib -L`${PYTHON}-config --prefix`/$libdir `${PYTHON}-config --ldflags`" - BUILD_PYTHON_SITE_PACKAGES=`$PYTHON -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix="${exec_prefix}"))'` - BUILD_PYTHON_INC=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()"` + BUILD_PYTHON_SITE_PACKAGES=${pythondir} + BUILD_PYTHON_INC=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_inc())" 2>/dev/null` BUILD_PYTHON_LIB=python$PYTHON_VERSION dnl Now check for python header using the include path obtained above |