forked from pypa/manylinux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pypa#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} | ||
|
||
# make sure this tarball is listed in pypy.sha256 | ||
grep " ${TARBALL}\$" ${MY_DIR}/pypy.sha256 > /dev/null | ||
# then check sha256 sum | ||
sha256sum -c --ignore-missing ${MY_DIR}/pypy.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 @@ | ||
dbf579f7eb5c527d37ecd43da88cbad02920881b608eb7486d70b4fa31bfc146 pypy3.7-v7.3.5rc3-aarch64.tar.bz2 | ||
d2daf8b1966497d09be703b939bd0020394e0738095243396b3d5f87cef0d815 pypy3.7-v7.3.5rc3-linux32.tar.bz2 | ||
1f9712fa86a50b1de00eb776f3e99033c2a7911dceaa8bc9daf77aa3d2a95842 pypy3.7-v7.3.5rc3-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