Skip to content

Prepare PyPI packaging and release workflow - #10

Merged
Shellghostt merged 1 commit into
mainfrom
pypi-packaging
Nov 9, 2026
Merged

Shellghostt merged 1 commit into
mainfrom
pypi-packaging

Conversation

@Shellghostt

Copy link
Copy Markdown
Owner

Refs #1 (do not close yet — the first upload is a manual, account-gated step)

What

Prepares the repo for pip install webvac:

  • Metadata cleanup in pyproject.toml: SPDX license = "MIT" (replaces the deprecated TOML table), explicit license-files, classifiers, keywords, and project URLs. Build requirement raised to setuptools>=77 for PEP 639 support.
  • Version single-sourcing: removed the duplicated version = "0.3.0"; the build now reads webvac.__version__ via [tool.setuptools.dynamic].
  • Release workflow (.github/workflows/release.yml): on a v* tag, builds sdist + wheel, runs twine check, verifies the tag matches webvac.__version__, then publishes with pypa/gh-action-pypi-publish using Trusted Publishing (OIDC, no stored token).
  • Docs: README gains a pip install webvac install path; docs/RELEASE_CHECKLIST.md gains a PyPI section; CHANGELOG.md gets an Unreleased entry.

Verification

$ python -m build
Successfully built webvac-0.3.0.tar.gz and webvac-0.3.0-py3-none-any.whl

$ python -m twine check dist/*
Checking dist/webvac-0.3.0-py3-none-any.whl: PASSED
Checking dist/webvac-0.3.0.tar.gz: PASSED

$ python -m pytest tests -q
43 passed

Wheel metadata confirms Version: 0.3.0, License-Expression: MIT, the five project URLs, Requires-Python: >=3.11, and the 3.11/3.12 classifiers.

Still required for the actual publish (user)

  1. Create the webvac project on PyPI (or a pending trusted publisher) with owner Shellghostt, repo WebVac, workflow release.yml.
  2. Pick the release version. v0.3.0 already exists and points at an older commit, so the tag-driven workflow needs a new tag. Either bump webvac/__init__.py (e.g. 0.3.1) and tag v0.3.1, or upload 0.3.0 manually with twine upload.
  3. Push the tag. The workflow refuses to publish if the tag and package version disagree.

- clean up project metadata: SPDX license expression, license file,
  classifiers, keywords, and project URLs
- single-source the version from webvac.__version__ instead of duplicating
  it in pyproject.toml
- add a tag-triggered Release workflow that builds, runs twine check,
  verifies the tag matches the package version, and publishes to PyPI via
  Trusted Publishing (no stored token)
- document pip install webvac, the release checklist, and the changelog
  entry

The first publish still needs the PyPI trusted publisher to be configured
and a version/tag decision: v0.3.0 already exists, so this workflow will
run on the next new tag.
@Shellghostt
Shellghostt merged commit c18584c into main Nov 9, 2026
4 checks passed
@Shellghostt
Shellghostt deleted the pypi-packaging branch November 9, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant