Skip to content

Commit 503c3f0

Browse files
committed
consolidate
1 parent d12f26e commit 503c3f0

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

pythonbuild/utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,7 @@ def target_needs(yaml_path: pathlib.Path, target: str):
9999
"""Obtain the dependencies needed to build the specified target."""
100100
settings = get_targets(yaml_path)[target]
101101

102-
needs = set(settings["needs"])
103-
# Linux distributions ship a fallback CA bundle for minimal images.
104-
if "-linux-" in target:
105-
needs.add("certifi")
102+
needs = set(target_makefile_needs(target, settings))
106103

107104
# Ship libedit linked readline extension to avoid a GPL dependency.
108105
needs.discard("readline")
@@ -114,6 +111,7 @@ def target_makefile_needs(target: str, settings: dict) -> list[str]:
114111
"""Obtain dependency names that should be emitted into target Makefiles."""
115112
needs = list(settings.get("needs", []))
116113

114+
# Linux distributions ship a fallback CA bundle for minimal images.
117115
if "-linux-" in target and "certifi" not in needs:
118116
needs.append("certifi")
119117

0 commit comments

Comments
 (0)