diff --git a/MANIFEST.in b/MANIFEST.in index 93a4480..200c135 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,6 +6,8 @@ include src/build_bcrypt.py recursive-include src/_csrc * recursive-include tests *.py -exclude requirements.txt tasks.py .travis.yml +exclude requirements.txt tasks.py .travis.yml wheel-scripts + +recursive-exclude wheel-scripts * prune .travis diff --git a/wheel-scripts/build_wheels.sh b/wheel-scripts/build_wheels.sh new file mode 100755 index 0000000..5648a17 --- /dev/null +++ b/wheel-scripts/build_wheels.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -x -e + +for PYBIN in /opt/python/*/bin; do + "${PYBIN}"/pip install cffi six -f /io/wheelhouse/ + "${PYBIN}"/pip wheel --no-deps bcrypt -w /wheelhouse/ +done + +for whl in /wheelhouse/bcrypt*.whl; do + auditwheel repair "$whl" -w /io/wheelhouse/ +done + +for PYBIN in /opt/python/*/bin/; do + "${PYBIN}"/pip install bcrypt --no-index -f /io/wheelhouse/ + "${PYBIN}"/python -c "import bcrypt;password = b'super secret password';hashed = bcrypt.hashpw(password, bcrypt.gensalt());bcrypt.checkpw(password, hashed)" +done diff --git a/wheel-scripts/docker.sh b/wheel-scripts/docker.sh new file mode 100755 index 0000000..7f15b80 --- /dev/null +++ b/wheel-scripts/docker.sh @@ -0,0 +1,3 @@ +#!/bin/bash +docker run --rm -v $(pwd):/io quay.io/pypa/manylinux1_x86_64 /io/build_wheels.sh +docker run --rm -v $(pwd):/io quay.io/pypa/manylinux1_i686 linux32 /io/build_wheels.sh