Skip to content

Commit

Permalink
Fix build patch
Browse files Browse the repository at this point in the history
  • Loading branch information
arcivanov committed Feb 13, 2025
1 parent 6f729c2 commit 4771b0e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions patches/0-patch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ index 90f2400..38c8111 100755
CFLAGS_EXTRA=""
CONFIGURE_ARGS=(--disable-shared --with-ensurepip=no)

-if [ "${2:-}" == "nogil" ]; then
+if [ "${2:-}" == "nogil" -o "${3:-}" == "nogil" ]; then
-if [ "${4:-}" == "nogil" ]; then
+if [ "${4:-}" == "nogil" -o "${5:-}" == "nogil" ]; then
PREFIX="${PREFIX}-nogil"
CONFIGURE_ARGS+=(--disable-gil)
fi

+if [ "${2:-}" == "shared" -o "${3:-}" == "shared" ]; then
+if [ "${4:-}" == "shared" -o "${5:-}" == "shared" ]; then
+ PREFIX="${PREFIX}-shared"
+ CONFIGURE_ARGS+=(--enable-shared)
+fi
Expand All @@ -67,8 +67,8 @@ index 90f2400..38c8111 100755
@@ -88,6 +93,9 @@ make > /dev/null
make install > /dev/null
popd
rm -rf "Python-${CPYTHON_VERSION}" "Python-${CPYTHON_VERSION}.tgz" "Python-${CPYTHON_VERSION}.tgz.asc"
+if [ "${2:-}" == "shared" -o "${3:-}" == "shared" ]; then
rm -rf "Python-${CPYTHON_VERSION}" "Python-${CPYTHON_VERSION}.tar.xz" "Python-${CPYTHON_VERSION}.tar.xz.sigstore" "Python-${CPYTHON_VERSION}.tar.xz.asc"
+if [ "${4:-}" == "shared" -o "${5:-}" == "shared" ]; then
+ patchelf --force-rpath --set-rpath '$ORIGIN/../lib' "${PREFIX}/bin/python3"
+fi

Expand Down

0 comments on commit 4771b0e

Please sign in to comment.