Skip to content
Snippets Groups Projects
Commit 712b36d5 authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

fix: add spec prefix to PYTHONPATH to allow imports during tests

previously, the prefix wasn't added to PYTHONPATH because it didn't exist yet at build-time
this fixes python package import tests, see https://github.com/spack/spack/issues/45801
parent e6642e60
No related tags found
No related merge requests found
......@@ -91,7 +91,6 @@ def setup_dependent_run_environment(self, env, dependent_spec):
# directories
for directory in {self.platlib, self.purelib}:
path = os.path.join(dependent_spec.prefix, directory)
if os.path.isdir(path):
env.prepend_path("PYTHONPATH", path)
dep_bin_dir = getattr(dependent_spec.package, "bindir", None)
if dep_bin_dir and os.path.isdir(dep_bin_dir):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment