Skip to content

Migrate packaging to pyproject.toml with an SPDX license#55

Merged
itg-karthicr merged 3 commits into
masterfrom
tooling/pyproject
Jun 24, 2026
Merged

Migrate packaging to pyproject.toml with an SPDX license#55
itg-karthicr merged 3 commits into
masterfrom
tooling/pyproject

Conversation

@itg-karthicr

@itg-karthicr itg-karthicr commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Closes #54

Summary

Migrates packaging from setup.py + the bespoke build-release.py to a standard pyproject.toml (PEP 621), with a PEP 639 SPDX license. The setuptools backend is kept, so pip install and production usage are unchanged — no uv or other tooling is introduced.

Changes

  • pyproject.toml — PEP 621 metadata, requires-python = ">=3.9", the test optional-dependencies extra, project URLs, and a dynamic version read from pystrix.VERSION ([tool.setuptools.dynamic]).
  • SPDX licenselicense = "LGPL-3.0-or-later" with license-files = ["COPYING", "COPYING.LESSER"]. The deprecated License :: trove classifier is dropped (PEP 639).
  • setuptools>=77 pinned in [build-system] for PEP 639 support; build isolation supplies it regardless of the locally installed setuptools.
  • ruff config moved from ruff.toml into [tool.ruff]; ruff.toml removed.
  • Removed setup.py and build-release.py. Building is now python -m build (sdist + wheel); the bespoke tarball and the already-dead RPM path it served are gone.
  • Updated README and AGENTS.md references, and refreshed two stale AGENTS notes that predated the test suite and linter. Reconciled the changelog.

Attribution

authors = Neil Tallim (the creator, per the README). maintainers = IVR Technology Group — the organization that maintains the package today. Individuals are not enumerated: every contributor stays credited via the GitHub contributors graph and the README, so the field never needs per-contributor updates. No emails are published (no contributor PII), consistent with the project's data-privacy stance.

Verification

  • python -m build produces an sdist and wheel; wheel metadata shows License-Expression: LGPL-3.0-or-later, License-File: COPYING/COPYING.LESSER, version 1.2.0, and no license classifier.
  • pip install -e '.[test]' works.
  • ruff check . and ruff format --check . pass (ruff reads [tool.ruff] from pyproject); 37 tests pass.

Follow-up

  • Cut the 1.3.0 release (bump VERSION, move [Unreleased], tag v1.3.0).

🤖 Generated with Claude Code

- Add pyproject.toml: PEP 621 metadata, requires-python >=3.9, the test
  extra, project URLs, and a dynamic version read from pystrix.VERSION.
- PEP 639 SPDX license: license = "LGPL-3.0-or-later" + license-files for
  COPYING and COPYING.LESSER. Drop the deprecated License :: classifier.
- Pin setuptools>=77 in [build-system] (PEP 639 support; supplied by build
  isolation).
- Move the ruff config from ruff.toml into [tool.ruff].
- Remove setup.py, build-release.py, and ruff.toml. Build with
  `python -m build`.
- Update README and AGENTS.md references (and refresh stale AGENTS notes
  that predated the test suite and linter), and the changelog.

Verified: `python -m build` produces sdist + wheel with the SPDX license
and bundled license files; `pip install -e '.[test]'` works; ruff and the
37 tests pass.

Closes #54
Per maintainer decision: the package metadata names the maintaining
organization rather than enumerating individuals (who stay credited via
the GitHub contributors graph and README). No emails, so no contributor
PII is published. Author remains Neil Tallim.
- Add a `package` CI job that runs `python -m build`, validates metadata
  with `twine check`, installs the wheel, and imports the package. The
  packaging migration's main regression surface was previously unguarded
  in CI (codex finding).
- Remove the stale `build-release.py` Fixed changelog entry: it credited
  a fix to a script this branch deletes, contradicting the migration
  entry in the same Unreleased block (consistency finding).

The dynamic-version reorder suggestion was dropped: codex verified the
static AST attr resolution returns the version without importing the
package, so no change is needed.
@itg-karthicr itg-karthicr merged commit d171f1f into master Jun 24, 2026
8 checks passed
@itg-karthicr itg-karthicr deleted the tooling/pyproject branch June 24, 2026 18:54
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.

Migrate packaging to pyproject.toml with an SPDX license

1 participant