Switch Djblets package building to use buildthings.
Review Request #14952 — Created March 20, 2026 and updated
Buildthings is our new Python package build backend, which supports
injecting local development source trees into the isolated build
environment, interfacing with npm, and running extra build steps.
It also notably allows for local paths for development dependencies,
something our in-tree build backend did not do.This change switches away from our in-tree build backend to
buildthings, giving us a consistent setup going forward and resolving
several issues when building Djblets.When building Djblets, development and package dependencies will be
installed in the isolated build environment for all build types,
allowing static media to be built.All build types support
.local-packages, since we need this in order
to build and deploy in-development versions.Builds can be tested using:
$ python -m build --sdist . $ python -m build --wheel .Doing these separately ensures that
.local-packageswill be picked up
for each build type, rather than the default behavior of the wheel being
built from the source distribution.
Tested editable installs and producing sdist and wheel builds.
Compared those to builds using the original build backend. Verified that
all files and metadata were a match.
- Change Summary:
-
Finalized the configuration based on the latest buildthings.
- Description:
-
Buildthings is our new Python package build backend, which supports
injecting local development source trees into the isolated build environment, interfacing with npm, and running extra build steps. It also notably allows for local paths for development dependencies, something our in-tree build backend did not do. This change switches away from our in-tree build backend to
buildthings, giving us a consistent setup going forward and resolving several issues when building Djblets. When building Djblets, development and package dependencies will be
installed in the isolated build environment for all build types, allowing static media to be built. ~ Editable builds support
.local-packages, but other build types do not~ (since we don't want to run the risk of creating public builds that ~ All build types support
.local-packages, since we need this in order~ to build and deploy in-development versions. - can't be reproduced). For local testing, this can be enabled in the tree - using: ~ ~ Builds can be tested using:
~ [tool.buildthings.isolation]~ local-packages-path = '.local-packages'
~ $ python -m build --sdist .~ $ python -m build --wheel .
- - - Then builds can be tested using:
- - - - $ python -m build --sdist .- $ python -m build --wheel .
- - - - Doing these separately ensures that
.local-packageswill be picked upfor each build type, rather than the default behavior of the wheel being built from the source distribution. - Commits:
-
Summary ID 683fa95b9740f44f979541ab476e88604b82dfe6 a4ce229740a26bb2370c59218b6df5b934182988 - Branch:
-
release-6.xrelease-5.x
Checks run (2 succeeded)
- Change Summary:
-
- Fixed some comments in
pyproject.toml. - Added the
build-i18nsteps. - Removed media and i18n building from the editable build.
- Added npm management to sdist and wheel builds.
.npm-workspacesandnode_modulesare now explicitly pruned.
- Fixed some comments in
- Commits:
-
Summary ID a4ce229740a26bb2370c59218b6df5b934182988 5089a2a310625f6714962508f9529f34c857e77d