Skip to content

Commit 28c5543

Browse files
committed
fixup! Build libtcl
1 parent 58b473d commit 28c5543

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cpython-unix/build-cpython.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,8 @@ if [ "${PYBUILD_SHARED}" = "1" ]; then
705705
${ROOT}/out/python/install/bin/python${PYTHON_MAJMIN_VERSION}
706706

707707
# Python's build system doesn't make this file writable.
708+
# TODO(geofft): @executable_path/ is a weird choice here, who is
709+
# relying on it? Should probably be @loader_path.
708710
chmod 755 ${ROOT}/out/python/install/lib/${LIBPYTHON_SHARED_LIBRARY_BASENAME}
709711
install_name_tool \
710712
-change /install/lib/${LIBPYTHON_SHARED_LIBRARY_BASENAME} @executable_path/${LIBPYTHON_SHARED_LIBRARY_BASENAME} \
@@ -723,6 +725,13 @@ if [ "${PYBUILD_SHARED}" = "1" ]; then
723725
-change /install/lib/${LIBPYTHON_SHARED_LIBRARY_BASENAME} @executable_path/../lib/${LIBPYTHON_SHARED_LIBRARY_BASENAME} \
724726
${ROOT}/out/python/install/bin/python${PYTHON_MAJMIN_VERSION}${PYTHON_BINARY_SUFFIX}
725727
fi
728+
729+
# At the moment, python3 and libpython don't have shared-library
730+
# dependencies, but at some point we will want to run this for
731+
# them too.
732+
for module in ${ROOT}/out/python/install/lib/python*/lib-dynload/*.so; do
733+
install_name_tool -rpath @loader_path/../.. "$module"
734+
done
726735
else # (not macos)
727736
LIBPYTHON_SHARED_LIBRARY_BASENAME=libpython${PYTHON_MAJMIN_VERSION}${PYTHON_BINARY_SUFFIX}.so.1.0
728737
LIBPYTHON_SHARED_LIBRARY=${ROOT}/out/python/install/lib/${LIBPYTHON_SHARED_LIBRARY_BASENAME}

0 commit comments

Comments
 (0)