Skip to content

Replace setup.py with declarative pyproject.toml packaging - #76

Merged
boronine merged 3 commits into
hsluv:masterfrom
boronine-bot:build/replace-setup-py
Oct 20, 2026
Merged

boronine merged 3 commits into
hsluv:masterfrom
boronine-bot:build/replace-setup-py

Conversation

@boronine-bot

Copy link
Copy Markdown
Contributor

Summary

A complete migration to pyproject.toml, offered as an alternative to the minimal build-system declaration in #75. This PR targets master independently; it does not require #75 to merge.

  • Remove setup.py and move package metadata and the single-module declaration to pyproject.toml.
  • Keep hsluv.__version__ as the version source via setuptools' dynamic attribute support, rather than importing the module from a setup script.
  • Use the SPDX license expression MIT and explicitly include LICENSE.txt. Require setuptools >=77.0.3 for modern license metadata support; the supported Python minimum remains 3.11.
  • Remove obsolete setup_requires, test_suite, and setup.cfg's Python 2/3 universal-wheel setting. Wheels are now correctly tagged py3-none-any.
  • Replace the outdated README test command with python -m unittest discover -v.
  • Update CI to build both distributions with python -m build, install the extracted source distribution, and install and test the wheel from outside the source tree.

Validation

  • Built an sdist and a wheel from that sdist with isolated builds and setuptools 84.2.0, without packaging warnings.
  • Installed both the sdist and wheel into virtual environments on Python 3.11.17 and 3.14.4. Both tests pass against each installed artifact, with imports verified to resolve to site-packages.
  • Verified installed metadata version matches hsluv.__version__ (5.0.4).
  • Built both distributions on Python 3.11 with the minimum declared setuptools version, 77.0.3.
  • python -m twine check dist/*: both artifacts pass.
  • git diff --check: passes.

Compatibility

Runtime code and the Python >=3.11 requirement are unchanged. Building from source requires a PEP 517-capable frontend and setuptools >=77.0.3 (normally supplied by pip's isolated build environment). Direct python setup.py ... commands are no longer available; use python -m build, python -m pip install ., or the documented unittest command instead. Installing published wheels does not require setuptools.

@boronine
boronine merged commit cb723be into hsluv:master Oct 20, 2026
2 checks passed
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.

2 participants