From 01babe79c8644ecc8af169f32f1ef619da73df0b Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 21 Dec 2016 01:38:57 +0100 Subject: [PATCH] Fix python-config: no longer links with libpython. Also adds python-config symlink to Python 3 installs. Closes: #85 --- docker/build_scripts/build_utils.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/build_scripts/build_utils.sh b/docker/build_scripts/build_utils.sh index 64efeec8..e34c209a 100755 --- a/docker/build_scripts/build_utils.sh +++ b/docker/build_scripts/build_utils.sh @@ -57,6 +57,13 @@ function do_cpython_build { # bin/python. if [ -e ${prefix}/bin/python3 ]; then ln -s python3 ${prefix}/bin/python + ln -s python3-config ${prefix}/bin/python-config + fi + # Remove -lpython from the python-config script. + if [ $(lex_pyver $py_ver) -lt $(lex_pyver 3.4) ]; then + sed -i "s/'-lpython' *+ *pyver\( *+ *sys.abiflags\)\?/''/" $(readlink -e ${prefix}/bin/python-config) + else + sed -i 's/-lpython${VERSION}${ABIFLAGS}//' $(readlink -e ${prefix}/bin/python-config) fi ${prefix}/bin/python get-pip.py ${prefix}/bin/pip install wheel