Switch RBTools's packaging to pyproject.toml.

Review Request #14138 — Created Sept. 3, 2024 and submitted — Latest diff uploaded

Information

RBTools
release-5.x

Reviewers

RBTools has historically been a setuptools-based project, relying
heavily on the dynamic ability of setup.py. Over the years, the Python
ecosystem has moved to pyproject.toml files, with pluggable build
backends. This has reached a point of maturity, and pip will soon
remove support for installing either production or editable installs
from a legacy source tree.

We now use pyproject.toml to define all of the metadata of the
package. Since RBTools's packaging needs are simple, we can get away
with using the setuptools.build_meta backend directly.

Tested isolated builds in the following setups:

  • python -m build . (builds sdist, then a wheel from the sdist)
  • python -m build . -s (builds sdist)
  • python -m build . -w (builds wheel)

Tested isolated editable installs using pip install -e . and
non-isolated editable installs using pip install -e --no-build-isolation
and with make develop.

Performed full tree diffs of generated wheels from ./setup.py bdist_wheel
(prior to this change) and both wheel-producing python -m build methods.
Verified that all content was identical, with the exception of differences
in source map paths and some modern metadata for the package.

Manually inspected the distribution contents to make sure we had everything
we want in the package and nothing we don't want.

Commits

Files