build-wheels.sh 836 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. set -e -x
  3. # Left-overs from previous builds may be binary incompatible
  4. rm -fr /io/build
  5. # Install a system package required by our library
  6. yum install -y gmp
  7. if [ -f /io/.separate_namespace ]; then
  8. PKG_NAME=pycryptodomex
  9. NAMESPACE=Cryptodome
  10. else
  11. PKG_NAME=pycryptodome
  12. NAMESPACE=Crypto
  13. fi
  14. WH=/io/wheelhouse/${PACKAGE_NAME}/$(uname -p)
  15. # Compile wheels
  16. for PYBIN in /opt/python/*/bin; do
  17. # "${PYBIN}/pip" install -r /io/dev-requirements.txt
  18. "${PYBIN}/pip" wheel /io/ -w ${WH}
  19. done
  20. # Bundle external shared libraries into the wheels
  21. for whl in ${WH}/*.whl; do
  22. auditwheel repair "$whl" -w ${WH}
  23. done
  24. # Install packages and test
  25. for PYBIN in /opt/python/*/bin/; do
  26. "${PYBIN}/pip" install ${PKG_NAME} --no-index -f ${WH}
  27. "${PYBIN}/python" -m ${NAMESPACE}.SelfTest --skip-slow-tests
  28. done