diff --git a/docker/build_scripts/build-cpython.sh b/docker/build_scripts/build-cpython.sh index 8a5854d6..ac2aed43 100755 --- a/docker/build_scripts/build-cpython.sh +++ b/docker/build_scripts/build-cpython.sh @@ -47,8 +47,8 @@ fi # do not change the default for user built extension (yet?) ./configure \ CFLAGS_NODIST="${MANYLINUX_CFLAGS} ${MANYLINUX_CPPFLAGS} ${CFLAGS_EXTRA}" \ - LDFLAGS_NODIST="${MANYLINUX_LDFLAGS}" \ - --prefix=${PREFIX} --disable-shared --with-ensurepip=no > /dev/null + LDFLAGS_NODIST="${MANYLINUX_LDFLAGS} -Wl,--rpath=${PREFIX}/lib" \ + --prefix=${PREFIX} --enable-shared --with-ensurepip=no > /dev/null make > /dev/null make install > /dev/null popd diff --git a/docker/build_scripts/finalize-python.sh b/docker/build_scripts/finalize-python.sh index 218def3b..62e4a30d 100755 --- a/docker/build_scripts/finalize-python.sh +++ b/docker/build_scripts/finalize-python.sh @@ -3,11 +3,4 @@ # Stop at any error, show all commands set -exuo pipefail -# most people don't need libpython*.a, and they're many megabytes. -# compress them all together for best efficiency -pushd /opt/_internal -XZ_OPT=-9e tar -cJf static-libs-for-embedding-only.tar.xz cpython-*/lib/libpython*.a -popd -find /opt/_internal -name '*.a' -print0 | xargs -0 rm -f - hardlink -cv /opt/_internal