- Python 3.8+ installed
- PyPI account with API token configured
- Write access to the repository
Update version in gliner2/__init__.py:
__version__ = "1.0.1" # New version# Install build tools
pip install build twine
# Clean previous builds
rm -rf dist/ build/ *.egg-info/
# Build package
python -m build# Test on TestPyPI first
twine upload --repository testpypi dist/*
# Install and test
pip install --index-url https://test.pypi.org/simple/ gliner2# Upload to production PyPI
twine upload dist/*- 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
# Install from PyPI
pip install gliner2==1.0.1
# Test basic functionality
python -c "from gliner2 import GLiNER2; print('✓ Import successful')"- 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
- Version updated in
__init__.py - Package builds without errors
- Uploaded to PyPI successfully
- GitHub release created
- Installation verified