From f9de72f24776538e7e2243f54ab46f3e3a921ab5 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sat, 20 Apr 2024 15:28:11 -0400 Subject: [PATCH] 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(). --- .../interpreters/python/catch_conflicts/catch_conflicts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py b/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py index cb2bd56c71d5..4713cfb7026e 100644 --- a/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py +++ b/pkgs/development/interpreters/python/catch_conflicts/catch_conflicts.py @@ -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])