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:
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user