Add and use a pyproject-compatible build backend for extensions.

Review Request #14140 — Created Sept. 4, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.1.x

Reviewers

We now support building extensions entirely based on a pyproject.toml.
This will be the standard going forward, and will require the following
configuration:

[build-system]
requires = [
    'reviewboard~=<version>',
    'reviewboard[extension-packaging]',
]
build-backend = 'reviewboard.extensions.packaging.backend'

If there's an existing setup.py, then things will continue to work
as-is. If one doesn't exist, it will be generated during the lifecycle
of the build, calling into our own setup() method. This is the same
process that setuptools itself uses when building packages, since it
still uses its own machinery under the hood.

rbext create will now generate this file automatically, and no longer
generates setup.py.

The documentation has been updated to reference pyproject.toml and
show examples, replacing all old setup.py references, old references
to eggs, and old command line examples, in an effort to help modernize
some of this.

Generated new extensions and built them without issue.

Added a bare-bones pyproject.toml to an existing package, specifying
the new build backend, and verified it built.

Built the docs and went over the changes, making sure they didn't appear
broken.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Add and use a pyproject-compatible build backend for extensions.
We now support building extensions entirely based on a `pyproject.toml`. This will be the standard going forward, and will require the following configuration: [build-system] requires = [ 'reviewboard~=<version>`, 'reviewboard[extension-packaging]', ] build-backend = 'reviewboard.extensions.packaging.backend' If there's an existing `setup.py`, then things will continue to work as-is. If one doesn't exist, it will be generated during the lifecycle of the build, calling into our own `setup()` method. This is the same process that setuptools itself uses when building packages, since it still uses its own machinery under the hood. `rbext create` will now generate this file automatically, and no longer generates `setup.py`. The documentation has been updated to reference `pyproject.toml` and show examples, replacing all old `setup.py` references, old references to eggs, and old command line examples, in an effort to help modernize some of this.
1101a6d850c3c49df6a820a94a8ac0b85cee5664 Christian Hammond
setup.py
docs/manual/admin/integrations/circle-ci.rst
docs/manual/extending/auth-backends.rst
docs/manual/extending/legacy-auth-backends.rst
docs/manual/extending/coderef/index.rst
docs/manual/extending/extensions/distribution.rst
docs/manual/extending/extensions/file-layout.rst
docs/manual/extending/extensions/rbext.rst
reviewboard/cmdline/rbext.py
reviewboard/extensions/packaging/backend.py
Loading...