pythonCatchConflictsHook: split propagated-build-inputs on runs of whitespace

Currently, nix-support/propagated-build-inputs is parsed by splitting on
a single space. This means that if this file contains multiple spaces
separating two paths, the build_inputs list will end up containing an
empty string.

Instead, call split() with no arguments, which splits on runs of
whitespace and also ignores whitespace at the beginning and end of the
string, eliminating the need for strip().
This commit is contained in:
Ben Wolsieffer
2024-04-26 21:05:42 -04:00
parent 7f14d675a7
commit f9de72f247
@@ -58,7 +58,7 @@ def find_packages(store_path: Path, site_packages_path: str, parents: List[str])
# recursively add dependencies
if propagated_build_inputs.exists():
with open(propagated_build_inputs, "r") as f:
build_inputs: List[str] = f.read().strip().split(" ")
build_inputs: List[str] = f.read().split()
for build_input in build_inputs:
find_packages(Path(build_input), site_packages_path, parents + [build_input])