diff options
author | Michael Howitz <mh@gocept.com> | 2021-08-30 10:13:24 +0200 |
---|---|---|
committer | Michael Howitz <mh@gocept.com> | 2021-08-30 10:13:24 +0200 |
commit | a30909b918595d41936b3bf3d549be2becd99f1d (patch) | |
tree | efe93f9eb24005c42cdcc2f5195e0c213011926e /.manylinux-install.sh | |
parent | 347d187367a4d96f4b9ba70c4a5f9aa4efa6197c (diff) | |
download | zope-security-a30909b918595d41936b3bf3d549be2becd99f1d.tar.gz |
Configuring for c-code
Diffstat (limited to '.manylinux-install.sh')
-rwxr-xr-x | .manylinux-install.sh | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/.manylinux-install.sh b/.manylinux-install.sh index f82f0c4..6972cae 100755 --- a/.manylinux-install.sh +++ b/.manylinux-install.sh @@ -1,17 +1,47 @@ #!/usr/bin/env bash +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/c-code set -e -x +# Running inside docker +# Set a cache directory for pip. This was +# mounted to be the same as it is outside docker so it +# can be persisted. +export XDG_CACHE_HOME="/cache" +# XXX: This works for macOS, where everything bind-mounted +# is seen as owned by root in the container. But when the host is Linux +# the actual UIDs come through to the container, triggering +# pip to disable the cache when it detects that the owner doesn't match. +# The below is an attempt to fix that, taken from bcrypt. It seems to work on +# Github Actions. +if [ -n "$GITHUB_ACTIONS" ]; then + echo Adjusting pip cache permissions + mkdir -p $XDG_CACHE_HOME/pip + chown -R $(whoami) $XDG_CACHE_HOME +fi +ls -ld /cache +ls -ld /cache/pip + +# We need some libraries because we build wheels from scratch: +yum -y install libffi-devel + # Compile wheels for PYBIN in /opt/python/*/bin; do if [[ "${PYBIN}" == *"cp27"* ]] || \ [[ "${PYBIN}" == *"cp35"* ]] || \ [[ "${PYBIN}" == *"cp36"* ]] || \ [[ "${PYBIN}" == *"cp37"* ]] || \ - [[ "${PYBIN}" == *"cp38"* ]]; then - "${PYBIN}/pip" install -U pip setuptools cffi + [[ "${PYBIN}" == *"cp38"* ]] || \ + [[ "${PYBIN}" == *"cp39"* ]]; then "${PYBIN}/pip" install -e /io/ "${PYBIN}/pip" wheel /io/ -w wheelhouse/ + if [ `uname -m` == 'aarch64' ]; then + cd /io/ + "${PYBIN}/pip" install tox + "${PYBIN}/tox" -e py + cd .. + fi rm -rf /io/build /io/*.egg-info fi done |