-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1099
- Loading branch information
Showing
6 changed files
with
98 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
|
||
# Stop at any error, show all commands | ||
set -exuo pipefail | ||
|
||
# Get script directory | ||
MY_DIR=$(dirname "${BASH_SOURCE[0]}") | ||
|
||
# Get build utilities | ||
source $MY_DIR/build_utils.sh | ||
|
||
|
||
PYTHON_VERSION=$1 | ||
PYPY_VERSION=$2 | ||
PYPY_DOWNLOAD_URL=https://downloads.python.org/pypy | ||
|
||
|
||
function get_shortdir { | ||
local exe=$1 | ||
$exe -c 'import sys; print("pypy%d.%d-%d.%d.%d" % (sys.version_info[:2]+sys.pypy_version_info[:3]))' | ||
} | ||
|
||
|
||
mkdir -p /tmp | ||
cd /tmp | ||
|
||
case ${AUDITWHEEL_ARCH} in | ||
x86_64) PYPY_ARCH=linux64;; | ||
i686) PYPY_ARCH=linux32;; | ||
aarch64) PYPY_ARCH=aarch64;; | ||
*) echo "No PyPy for ${AUDITWHEEL_ARCH}"; exit 0;; | ||
esac | ||
|
||
TARBALL=pypy${PYTHON_VERSION}-v${PYPY_VERSION}-${PYPY_ARCH}.tar.bz2 | ||
TMPDIR=/tmp/${TARBALL/.tar.bz2//} | ||
PREFIX="/opt/_internal" | ||
|
||
mkdir -p ${PREFIX} | ||
|
||
fetch_source ${TARBALL} ${PYPY_DOWNLOAD_URL} | ||
|
||
# We only want to check the current tarball sha256sum | ||
grep " ${TARBALL}\$" ${MY_DIR}/pypy.sha256 > ${TARBALL}.sha256 | ||
# then check sha256 sum | ||
sha256sum -c ${TARBALL}.sha256 | ||
|
||
tar -xf ${TARBALL} | ||
|
||
# the new PyPy 3 distributions don't have pypy symlinks to pypy3 | ||
if [ ! -f "${TMPDIR}/bin/pypy" ]; then | ||
ln -s pypy3 ${TMPDIR}/bin/pypy | ||
fi | ||
|
||
# rename the directory to something shorter like pypy3.7-7.3.4 | ||
PREFIX=${PREFIX}/$(get_shortdir ${TMPDIR}/bin/pypy) | ||
mv ${TMPDIR} ${PREFIX} | ||
|
||
# add a generic "python" symlink | ||
if [ ! -f "${PREFIX}/bin/python" ]; then | ||
ln -s pypy ${PREFIX}/bin/python | ||
fi | ||
|
||
# remove debug symbols | ||
rm ${PREFIX}/bin/*.debug | ||
|
||
# We do not need the Python test suites | ||
find ${PREFIX} -depth \( -type d -a -name test -o -name tests \) | xargs rm -rf | ||
|
||
# We do not need precompiled .pyc and .pyo files. | ||
clean_pyc ${PREFIX} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
85d83093b3ef5b863f641bc4073d057cc98bb821e16aa9361a5ff4898e70e8ee pypy3.7-v7.3.5-aarch64.tar.bz2 | ||
3dd8b565203d372829e53945c599296fa961895130342ea13791b17c84ed06c4 pypy3.7-v7.3.5-linux32.tar.bz2 | ||
9000db3e87b54638e55177e68cbeb30a30fe5d17b6be48a9eb43d65b3ebcfc26 pypy3.7-v7.3.5-linux64.tar.bz2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters