1.6 KiB
1.6 KiB
PyPI Release Guide for GLiNER2
Prerequisites
- Python 3.8+ installed
- PyPI account with API token configured
- Write access to the repository
Release Steps
1. Update Version
Update version in gliner2/__init__.py:
__version__ = "1.0.1" # New version
2. Build Package
# Install build tools
pip install build twine
# Clean previous builds
rm -rf dist/ build/ *.egg-info/
# Build package
python -m build
3. Test Build (Optional)
# Test on TestPyPI first
twine upload --repository testpypi dist/*
# Install and test
pip install --index-url https://test.pypi.org/simple/ gliner2
4. Upload to PyPI
# Upload to production PyPI
twine upload dist/*
5. Create GitHub Release
- Go to GitHub repository → Releases
- Click "Create a new release"
- Tag:
v1.0.1(matching version) - Title:
GLiNER2 v1.0.1 - Description: Summary of changes
- Attach built wheels from
dist/folder
6. Verify Release
# Install from PyPI
pip install gliner2==1.0.1
# Test basic functionality
python -c "from gliner2 import GLiNER2; print('✓ Import successful')"
Troubleshooting
- Authentication error: Configure PyPI token in
~/.pypircor use--username __token__ - File exists error: Version already exists on PyPI, increment version number
- Build fails: Check
pyproject.tomldependencies and Python version compatibility
Checklist
- Version updated in
__init__.py - Package builds without errors
- Uploaded to PyPI successfully
- GitHub release created
- Installation verified