python-pytokens
Subpackage Descriptions
| single |
# pytokens
A Fast, spec compliant Python 3.14+ tokenizer that runs on older Pythons.
## Installation
`bash
pip install pytokens
`
## Usage
```bash
python -m pytokens path/to/file.py
```
## Local Development / Testing
- Create and activate a virtual environment
- Run `PYTOKENS_USE_MYPYC=0 pip install -e '.[dev]'` to do an editable
install
- Run `pytest` to run tests
## Type Checking
Run `mypy .`
## Compilation with mypyc
By default, we compile with mypyc.
Use the `PYTOKENS_USE_MYPYC` environment variable to control this.
To check if you are using a compiled version, see whether the output of
this is `.py` or `.so`:
```bash
python -c "import pytokens; print(pytokens.__file__)"
```
## Create and upload a package to PyPI
1. Make sure to bump the version in `pyproject.toml`.
2. Push to Github so CI can build the wheels and sdist.
3. Download the artifacts from the CI run.
- Find the "Build wheels" job, click "Summary", scroll down to the bottom
to see "Artifacts"
and download the `cibw-wheels` artifact.
4. Unzip the artifact.
5. Upload the contents of the artifact to PyPI
- e.g. via `twine upload cibw-wheels/*`
|
Configuration Switches (platform-specific settings discarded)
PY313 OFF Build using Python 3.13
PY314 ON Build using Python 3.14
Package Dependencies by Type
Download groups
| main |
mirror://PYPIWHL/7c/3c/6941a82f4f130af6e1c68c076b6789069ef10c04559bd4733650f902fd3b |
Distribution File Information
0508d11b4de157ee12063901603be87fb0253e8f4cb9305eb168b1202ab92068 13224 python-src/pytokens-0.4.0-py3-none-any.whl
Ports that require python-pytokens:v14