Skip to content

Commit 712a0a9

Browse files
authored
Merge pull request #771 from dhellmann/build-parallel-installation-dependencies
fix: build installation dependencies before building consumers
2 parents 5d8e6e4 + fb32ee6 commit 712a0a9

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/fromager/commands/build.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -643,13 +643,17 @@ def update_progressbar_cb(future: concurrent.futures.Future) -> None:
643643
with req_ctxvar_context(
644644
Requirement(node.canonicalized_name), node.version
645645
):
646-
# Get all build dependencies (build-system, build-backend, build-sdist)
646+
# Get all dependencies. If package A needs package B to be
647+
# installed, package B should not have a build dependency on
648+
# package A. So, building the installation dependencies of a
649+
# package before we build that package should be possible,
650+
# and doing so ensures that when we mark a package as ready
651+
# to be used for building other packages, all of the
652+
# installation dependencies are also ready.
647653
build_deps: DependencyNodeList = [
648-
edge.destination_node
649-
for edge in node.children
650-
if edge.req_type.is_build_requirement
654+
edge.destination_node for edge in node.children
651655
]
652-
# A node can be built when all of its build dependencies are built
656+
# A node can be built when all of its dependencies are built
653657
unbuilt_deps: set[str] = set(
654658
dep.key for dep in build_deps if dep.key not in built_node_keys
655659
)

0 commit comments

Comments
 (0)