Add the buildthings build backend.
Review Request #14951 — Created March 20, 2026 and submitted — Latest diff uploaded
Buildthings is a setuptools-based Python build backend that makes it
easier to work with projects with more complex build requirements,
particularly those involving NPM or packages that may still be in
development in local source trees.It's based on the build backends we introduced in Review Board and
Djblets, but more refined and capable of being expanded for additional
use cases down the road.This initial version supports:
-
.local-packages/, mapping dependency names to local source trees,
used in isolated build environments (available per-build type). -
Options for including dev- and install-time dependencies within the
isolated build environments (available per-build type). -
An option for excluding certain, more complex dependencies from the
isolated environments (available per-build type). -
Options for enabling NPM installs and for managing workspaces based on
other Python packages. -
Support for extra build steps for editables, wheels, and source
distributions.
Much of this behaves the way it did in our in-tree build backends, but
with several behavior issues fixed. For example, development
dependencies will now map to local paths if found in .local-packages/.
Further, depending on an editable package using this backend will no
longer error out when it in turn depends on other local trees.
Full documentation for all the options are available in the README.
Converted Djblets and Review Board over to buildthings.
Tested building in new virtualenvs using editable mode, ensuring
that.local-packageswas picked up, and using the install deps
options.Checked that when building Review Board, the Djblets
.local-packages
was used.Verified that the local packages weren't installed as package
dependencies (which would override any editable installs).Tested various combinations of the options and overrides.
Tested building sdist and wheel distributions, with and without
.local-packagesand other deps turned on.Tested the build steps support.
Tested that when building packages with
include-{dev,install}-deps,
those packages were installed in the environment but that the
development deps didn't become part of the final package's dependency
list.