Files
tokenizers/bindings/python/build-wheels.sh
Anthony MOI 847651445e Fix build-wheels.sh script for manylinux wheels
Before this change, we added the `.so` files from previous version in
the `.whl` files of later versions.

Fix #301
2020-06-11 12:43:40 -04:00

25 lines
692 B
Bash
Executable File

#!/bin/bash
set -ex
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2020-05-14 -y
export PATH="$HOME/.cargo/bin:$PATH"
for PYBIN in /opt/python/{cp35-cp35m,cp36-cp36m,cp37-cp37m,cp38-cp38}/bin; do
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"
"${PYBIN}/pip" install -U setuptools-rust
"${PYBIN}/python" setup.py bdist_wheel
rm -rf build/*
done
for whl in dist/*.whl; do
auditwheel repair "$whl" -w dist/
done
# Keep only manylinux wheels
rm dist/*-linux_*
# Upload wheels
/opt/python/cp37-cp37m/bin/pip install -U awscli
/opt/python/cp37-cp37m/bin/python -m awscli s3 sync --exact-timestamps ./dist "s3://tokenizers-releases/python/$GITHUB_SHA"