Recurse into nested .local-packages when setting up build environments.
Review Request #15103 — Created June 7, 2026 and updated
When setting up the isolated build environment, buildthings would look
up the.local-packagesand replace any mentions of dependencies with
those paths.The problem came from when one of those dependencies had its own
.local-packages. Those would also be found at that package's own build
time, but the resulting wheel used for the parent's isolated build
environment wouldn't contain those replaced dependencies. This would
cause the main build environment to fail, since it had no knowledge of
the paths.Now, buildthings will recurse into
.local-packagesfrom any package
mentioned in a.local-packagesand mark them as explicit build-time
dependencies. This differs from the normal approach of applying those to
a list of dependencies, since we don't have the ability to intercept and
normalize any dependencies' dependencies. So we add them to the
build-time dependencies to ensure they get installed and satisfy the
packages.Package-time dependencies are not affected.
Unit tests pass.
Successfully installed Review Board 9, which had a local-packages
dependency chain looking like:
reviewboard->Djblets,django_evolutionDjblets->django_evolution,django-assert-queries
This was failing to install django-assert-queries prior to this
change. With the fix, it now finds and installs it in the build
environment successfully.
| Summary | ID |
|---|---|
| 29d3de55ad492e09382d98405e02183e07f0ec64 |
| Description | From | Last Updated |
|---|---|---|
|
While local packages are an editable thing, just for consistency I feel like this should pass the build type in … |
|
|
|
Can we dedupe by (canonicalized) package name? |
|
|
|
Even though this is "internal", given that it's not unused, we should call it seen instead of _seen |
|
|
|
dict -> set |
|
|
|
Can we add a type annotation here? |
|
|
|
This method has some pretty intense side effects, prepending a bunch of stuff to sys.path and resolving dynamic keys (importing … |
|
-
-
While local packages are an editable thing, just for consistency I feel like this should pass the build type in (since we have it).
-
-
-
-
-
This method has some pretty intense side effects, prepending a bunch of stuff to
sys.pathand resolving dynamic keys (importing those modules).Since we just care about the
local_packages_pathkey, can we load the toml file directly and read that key?