Skip to content

Commit 01babe7

Browse files
committed
Fix python-config: no longer links with libpython.
Also adds python-config symlink to Python 3 installs. Closes: pypa#85
1 parent f740e9e commit 01babe7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docker/build_scripts/build_utils.sh

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ function do_cpython_build {
5757
# bin/python.
5858
if [ -e ${prefix}/bin/python3 ]; then
5959
ln -s python3 ${prefix}/bin/python
60+
ln -s python3-config ${prefix}/bin/python-config
61+
fi
62+
# Remove -lpython from the python-config script.
63+
if [ $(lex_pyver $py_ver) -lt $(lex_pyver 3.4) ]; then
64+
sed -i "s/'-lpython' *+ *pyver\( *+ *sys.abiflags\)\?/''/" $(readlink -e ${prefix}/bin/python-config)
65+
else
66+
sed -i 's/-lpython${VERSION}${ABIFLAGS}//' $(readlink -e ${prefix}/bin/python-config)
6067
fi
6168
${prefix}/bin/python get-pip.py
6269
${prefix}/bin/pip install wheel

0 commit comments

Comments
 (0)