Skip to content

build: migrate packaging from setup.py to pyproject.toml - #435

Merged
olemke merged 1 commit into
atmtools:masterfrom
olemke:pyproject-migration
Aug 11, 2026
Merged

build: migrate packaging from setup.py to pyproject.toml#435
olemke merged 1 commit into
atmtools:masterfrom
olemke:pyproject-migration

Conversation

@olemke

@olemke olemke commented Aug 11, 2026

Copy link
Copy Markdown
Member

This PR modernizes the Python packaging configuration by migrating project metadata and dependencies from the legacy setup.py to a declarative pyproject.toml using PEP 621. The CI publish workflow and Conda recipe are updated accordingly to use the modern build toolchain instead of the deprecated python setup.py sdist bdist_wheel invocation.

Changes

  • pyproject.toml (new): Declares the build system (setuptools>=64, wheel), all project metadata, classifiers, dependencies, and optional-dependency groups (docs, tests); version is declared as dynamic and supplied by setup.py. Package data previously enumerated in MANIFEST.in is now declared under [tool.setuptools.package-data], and package discovery is constrained to typhon* via [tool.setuptools.packages.find].
  • setup.py: Reduced to a minimal shim that reads typhon/VERSION (with a git describe fallback for dev builds) and passes the version to setup(). All metadata, classifiers, and install_requires previously duplicated here have been removed.
  • MANIFEST.in (deleted): No longer required since package data is now declared declaratively in pyproject.toml.
  • setup.cfg (deleted): Removed the obsolete [aliases] test=pytest shim that is no longer used by modern tooling.
  • .github/workflows/python-publish.yml: Replaced setuptools wheel with build and switched the build command from python setup.py sdist bdist_wheel to python -m build, aligning the release pipeline with PEP 517.
  • conda/conda.recipe/meta.yaml: Dropped the load_setup_py_data introspection of setup.py and the associated Jinja loops over install_requires/url/license/description; the runtime dependencies and about metadata are now listed statically, with the homepage pointing at the dev URL and the summary explicitly written out.

Breaking Changes

⚠️ Minimum Python is now declared via requires-python = ">=3.12" (matching the existing classifiers); the previous python_requires="~=3.12" was effectively equivalent, so no runtime breakage is expected, but consumers building from source must use setuptools>=64 and a PEP 517-compatible build frontend (e.g. python -m build).

Move all project metadata, dependencies, and package-data declarations
into a PEP 621 pyproject.toml using the setuptools build backend.

- Add pyproject.toml with dynamic version, deps, optional-dependencies
- Reduce setup.py to a minimal shim that supplies only the version
  (preserving the git-describe dev-suffix fallback)
- Delete setup.cfg (unused [aliases] test=pytest) and MANIFEST.in
  (data-file globs now in [tool.setuptools.package-data])
- Switch python-publish workflow to `python -m build`
- Inline metadata in conda recipe (drop load_setup_py_data)
@olemke
olemke merged commit ce74827 into atmtools:master Aug 11, 2026
9 checks passed
@olemke
olemke deleted the pyproject-migration branch August 11, 2026 09:37
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