mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 00:35:35 +00:00
Move Python source to subdirectory.
This allows testing versions not built in-place. Otherwise importing (or testing) in the package root fails without develop builds. Replace maturin with setuptools_rust since maturin fails with proper project structure.
This commit is contained in:
4
.github/workflows/python.yml
vendored
4
.github/workflows/python.yml
vendored
@ -114,6 +114,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m venv .env
|
python -m venv .env
|
||||||
source .env/bin/activate
|
source .env/bin/activate
|
||||||
pip install pytest requests maturin
|
pip install pytest requests setuptools_rust
|
||||||
maturin develop --release
|
python setup.py develop
|
||||||
make test
|
make test
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
# Format source code automatically
|
# Format source code automatically
|
||||||
style:
|
style:
|
||||||
black --line-length 100 --target-version py35 examples tokenizers tests
|
black --line-length 100 --target-version py35 examples py_src/tokenizers tests
|
||||||
|
|
||||||
# Check the source code is formatted correctly
|
# Check the source code is formatted correctly
|
||||||
check-style:
|
check-style:
|
||||||
black --check --line-length 100 --target-version py35 examples tokenizers tests
|
black --check --line-length 100 --target-version py35 examples py_src/tokenizers tests
|
||||||
|
|
||||||
# Launch the test suite
|
# Launch the test suite
|
||||||
test:
|
test:
|
||||||
|
@ -31,6 +31,7 @@ setup(
|
|||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
||||||
],
|
],
|
||||||
|
package_dir={"": "py_src"},
|
||||||
packages=[
|
packages=[
|
||||||
"tokenizers",
|
"tokenizers",
|
||||||
"tokenizers.models",
|
"tokenizers.models",
|
||||||
|
Reference in New Issue
Block a user