Release Guide
Publishing to PyPI
Section titled “Publishing to PyPI”-
Update the version
Edit
pyproject.tomland bump the version number:[project]name = "mcilspy"version = "0.6.0"mcilspy uses date-aware versioning. Patch versions within a date are fine for same-day fixes.
-
Clean and build
Always clean
dist/before building. Stale files from previous builds cause duplicate upload attempts — PyPI rejects already-published versions.Terminal window rm -rf dist/ && uv buildThis produces both a
.tar.gzsource distribution and a.whlwheel indist/. -
Check the package
Verify the package metadata and structure before uploading:
Terminal window twine check dist/* -
Upload to PyPI
Terminal window uv publish --token $(grep password ~/.pypirc | head -1 | awk '{print $3}') -
Verify the release
Terminal window pip index versions mcilspyOr install it fresh:
Terminal window pip install mcilspy==0.6.0
Important Notes
Section titled “Important Notes”Pre-Release Checklist
Section titled “Pre-Release Checklist”Before publishing, verify:
- All tests pass:
pytest - Linting is clean:
ruff check src/ - Version in
pyproject.tomlis updated - Changelog is updated in the docs site
- The package installs and runs locally:
uv pip install -e . && mcilspy
Build System
Section titled “Build System”mcilspy uses Hatch as its build backend:
[build-system]requires = ["hatchling"]build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]packages = ["src/mcilspy"]The src layout means the package source lives in src/mcilspy/ and the wheel maps it to mcilspy/ at install time. The entry point is defined as:
[project.scripts]mcilspy = "mcilspy.server:main"This creates the mcilspy CLI command that users invoke directly or through uvx mcilspy.