summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2017-11-01 16:47:08 +0000
committerSimon McVittie <smcv@collabora.com>2017-11-01 16:47:08 +0000
commitfeb9494f1804cf3b95e4db4e6fbe5f76a5d8134e (patch)
treea561d086e41394d63ba24ed3d01d63da540ba6e5 /tools
parent913e24555b0abbb5893fd805d8b908ea80487aea (diff)
Work around limitations of Python 2 distutils and AX_PYTHON_DEVEL
Python 2 doesn't have the LDVERSION, so AX_PYTHON_DEVEL has to form PYTHON_LIBS using plain VERSION, which doesn't have the _d suffix. There doesn't seem to be a good way to find out that we need this, so I can't upstream a fix to autoconf-archive. However, the -dbg flavour is mostly a Debianism anyway, and in the long term the problem will be fixed by Python 2 going away. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci-build.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/ci-build.sh b/tools/ci-build.sh
index 8a91b54..5bee4ae 100755
--- a/tools/ci-build.sh
+++ b/tools/ci-build.sh
@@ -43,6 +43,18 @@ if [ -n "$TRAVIS" ] && [ -n "$dbus_ci_system_python" ]; then
unset VIRTUAL_ENV
export PATH=/usr/bin:/bin
export PYTHON="$(command -v "$dbus_ci_system_python")"
+
+ case "$dbus_ci_system_python" in
+ (python-dbg|python2.7-dbg)
+ # This is a workaround. Python 2 doesn't have the
+ # LDVERSION sysconfig variable, which would give
+ # AX_PYTHON_DEVEL the information it needs to know
+ # that it should link -lpython2.7_d and not
+ # -lpython2.7.
+ export PYTHON_LIBS="-lpython${TRAVIS_PYTHON_VERSION}_d"
+ ;;
+ esac
+
elif [ -n "$TRAVIS_PYTHON_VERSION" ]; then
# Possibly in a virtualenv
dbus_ci_bindir="$(python -c 'import sys; print(sys.prefix)')"/bin