mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-31 12:39:21 +00:00
Update wheel building
This commit is contained in:
18
bindings/python/build-wheels.sh
Executable file
18
bindings/python/build-wheels.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2019-11-01 -y
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
|
||||||
|
cd /io/bindings/python
|
||||||
|
|
||||||
|
for PYBIN in /opt/python/{cp35-cp35m,cp36-cp36m,cp37-cp37m}/bin; do
|
||||||
|
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"
|
||||||
|
|
||||||
|
"${PYBIN}/pip" install -U setuptools-rust
|
||||||
|
"${PYBIN}/python" setup.py bdist_wheel
|
||||||
|
done
|
||||||
|
|
||||||
|
for whl in dist/*.whl; do
|
||||||
|
auditwheel repair "$whl" -w dist/
|
||||||
|
done
|
@ -4,6 +4,11 @@ from setuptools_rust import Binding, RustExtension
|
|||||||
setup(
|
setup(
|
||||||
name="tokenizers",
|
name="tokenizers",
|
||||||
version="0.0.2",
|
version="0.0.2",
|
||||||
|
description="Fast and Customizable Tokenizers",
|
||||||
|
author="Anthony MOI",
|
||||||
|
author_email="anthony@huggingface.co",
|
||||||
|
url="https://github.com/huggingface/tokenizers",
|
||||||
|
license="Apache License 2.0",
|
||||||
rust_extensions=[RustExtension("tokenizers.tokenizers", binding=Binding.PyO3)],
|
rust_extensions=[RustExtension("tokenizers.tokenizers", binding=Binding.PyO3)],
|
||||||
packages=["tokenizers"],
|
packages=["tokenizers"],
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
|
Reference in New Issue
Block a user