Skip to content

Commit 51a59c1

Browse files
committed
Move copying of libtcl.so and libtk.so before patchelf
This block was just added in astral-sh#676 and isn't actually Tcl/Tk-specific.
1 parent 20eacbc commit 51a59c1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cpython-unix/build-cpython.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,14 @@ fi
683683
# This ensures we can run the binary in any location without
684684
# LD_LIBRARY_PATH pointing to the directory containing libpython.
685685
if [ "${PYBUILD_SHARED}" = "1" ]; then
686+
(
687+
shopt -s nullglob
688+
dylibs=(${TOOLS_PATH}/deps/lib/lib*.dylib ${TOOLS_PATH}/deps/lib/lib*.so)
689+
if [ "${#dylibs[@]}" -gt 0 ]; then
690+
cp -av "${dylibs[@]}" ${ROOT}/out/python/install/lib/
691+
fi
692+
)
693+
686694
if [[ "${PYBUILD_PLATFORM}" = macos* ]]; then
687695
# There's only 1 dylib produced on macOS and it has the binary suffix.
688696
LIBPYTHON_SHARED_LIBRARY_BASENAME=libpython${PYTHON_MAJMIN_VERSION}${PYTHON_BINARY_SUFFIX}.dylib
@@ -1266,14 +1274,6 @@ if [ -d "${TOOLS_PATH}/deps/lib/tcl8" ]; then
12661274
for source in ${TOOLS_PATH}/deps/lib/{itcl4.2.4,tcl8,tcl8.6,thread2.8.9,tk8.6}; do
12671275
cp -av $source ${ROOT}/out/python/install/lib/
12681276
done
1269-
1270-
(
1271-
shopt -s nullglob
1272-
dylibs=(${TOOLS_PATH}/deps/lib/lib*.dylib ${TOOLS_PATH}/deps/lib/lib*.so)
1273-
if [ "${#dylibs[@]}" -gt 0 ]; then
1274-
cp -av "${dylibs[@]}" ${ROOT}/out/python/install/lib/
1275-
fi
1276-
)
12771277
fi
12781278

12791279
# Copy the terminfo database if present.

0 commit comments

Comments
 (0)