File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff 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} \
@@ -718,6 +720,14 @@ if [ "${PYBUILD_SHARED}" = "1" ]; then
718720 -change /tools/deps/lib/libz.1.dylib /usr/lib/libz.1.dylib \
719721 ${ROOT} /out/python/install/lib/${LIBPYTHON_SHARED_LIBRARY_BASENAME}
720722
723+ # At the moment, python3 and libpython don't have shared-library
724+ # dependencies, but at some point we will want to run this for
725+ # them too.
726+ for module in ${ROOT} /out/python/install/lib/python* /lib-dynload/* .so; do
727+ install_name_tool \
728+ -rpath @loader_path/../..
729+ done
730+
721731 if [ -n " ${PYTHON_BINARY_SUFFIX} " ]; then
722732 install_name_tool \
723733 -change /install/lib/${LIBPYTHON_SHARED_LIBRARY_BASENAME} @executable_path/../lib/${LIBPYTHON_SHARED_LIBRARY_BASENAME} \
You can’t perform that action at this time.
0 commit comments