Skip to content

Commit

Permalink
packaging: refactor build list generation
Browse files Browse the repository at this point in the history
Issue: #1530
  • Loading branch information
jbertran committed Sep 18, 2019
1 parent 0e4f266 commit e17c529
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions buildchain/buildchain/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,17 @@ def _package(name: str, sources: List[Path]) -> targets.Package:
),
}

_TO_BUILD_PKG_NAMES : List[str] = []

for pkgs in TO_BUILD.values():
for pkg in pkgs:
_TO_BUILD_PKG_NAMES.append(pkg.name)
def _list_packages_to_build(
pkg_cats: Dict[str, Tuple[targets.Package, ...]]
) -> List[str]:
return [
pkg.name for pkg_list in pkg_cats.values()
for pkg in pkg_list
]


_TO_BUILD_PKG_NAMES : List[str] = _list_packages_to_build(TO_BUILD)

# All packages not referenced in `TO_BUILD` but listed in `versions.PACKAGES`
# are supposed to be downloaded.
Expand Down

0 comments on commit e17c529

Please sign in to comment.