Skip to content

Commit f269be7

Browse files
authored
Fix hashlib too. Also use GH download link as python.org 403'd me (#97)
* Fix hashlib too. Also use GH download link as python.org 403'd me
1 parent 50a8ac8 commit f269be7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fi
1818
REVISION="python-${VERSION}"
1919
initialise "${REVISION}" "${OUTPUT}" "${LAST_REVISION}"
2020

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

2323
SSL_PREFIX=/root/ssl
2424
SSL_VERSION=3.3.2
@@ -37,7 +37,7 @@ export LD_LIBRARY_PATH=${SSL_PREFIX}/lib64
3737

3838
DEST=/root/python
3939

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

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

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

0 commit comments

Comments
 (0)