PyPI Publishing Guide¶
This guide explains how to publish AXON packages to PyPI.
Prerequisites¶
- PyPI Account: Create an account at https://pypi.org
- API Token: Generate an API token in PyPI account settings
- Build Tools: Install maturin and twine
Building Packages¶
Build Python Wheel¶
# Build release wheel
maturin build --release
# Build for specific Python version
maturin build --release --interpreter python3.14
# Build universal wheel (multiple Python versions)
maturin build --release --universal
Build Source Distribution¶
Build Output¶
Wheels are generated in target/wheels/:
target/wheels/
├── axon_quant-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
├── axon_quant-0.1.0-cp312-cp312-manylinux_2_17_x86_64.whl
└── axon_quant-0.1.0.tar.gz
Publishing to TestPyPI¶
Test packages on TestPyPI before production:
# Upload to TestPyPI
twine upload --repository testpypi target/wheels/*
# Install from TestPyPI
pip install --index-url https://test.pypi.org/simple/ axon-quant
Publishing to PyPI¶
Version Management¶
Update version in pyproject.toml:
AXON follows Semantic Versioning: - MAJOR: Breaking changes - MINOR: New features (backwards compatible) - PATCH: Bug fixes
CI/CD Publishing¶
AXON uses GitHub Actions for automated publishing:
- Push to
mainbranch triggers build - Create git tag for release:
git tag v0.1.0 - Push tag:
git push origin v0.1.0 - GitHub Actions builds and publishes to PyPI
Troubleshooting¶
"File already exists" error¶
Package version already exists. Bump version number.
Authentication failure¶
Verify API token is correct and has upload permissions.
Build fails¶
Check Rust toolchain version and Python version compatibility.
Next Steps¶
- Installation — Install AXON
- Python Bindings — Python API documentation