Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hashlib too. Also use GH download link as python.org 403'd me #97

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions python/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
REVISION="python-${VERSION}"
initialise "${REVISION}" "${OUTPUT}" "${LAST_REVISION}"

curl -sL https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tar.xz | tar Jxf -
curl -sL https://github.com/python/cpython/archive/refs/tags/v${VERSION}.tar.gz | tar zxf -

SSL_PREFIX=/root/ssl
SSL_VERSION=3.3.2
Expand All @@ -37,7 +37,7 @@ export LD_LIBRARY_PATH=${SSL_PREFIX}/lib64

DEST=/root/python

pushd Python-${VERSION}
pushd cpython-${VERSION}
./configure \
--prefix=${DEST} \
--with-openssl=${SSL_PREFIX} \
Expand All @@ -52,8 +52,9 @@ popd
# copy SSL SOs to the same directory as the native python modules
cp ${SSL_PREFIX}/lib64/*.so* /root/python/lib/python*/lib-dynload/

# then patch the ssl to look at $ORIGIN to find the crypto libs
# then patch the ssl and hashlib to look at $ORIGIN to find the crypto libs
patchelf --set-rpath \$ORIGIN /root/python/lib/python*/lib-dynload/_ssl*.so
patchelf --set-rpath \$ORIGIN /root/python/lib/python*/lib-dynload/_hashlib*.so

# strip executables
find ${DEST} -type f -perm /u+x -exec strip -d {} \;
Expand Down
Loading