Compare commits

...

6 Commits

Author SHA1 Message Date
Harmen Stoppels
614714fc01
delete dead code 2025-01-06 15:07:48 +01:00
Wouter Deconinck
b328b5d169
PythonPackage: call python and pass env mods 2025-01-05 09:47:58 -06:00
Wouter Deconinck
cda1a2fd91
PythonPackage: fix style 2025-01-03 19:43:21 -06:00
Wouter Deconinck
4181237bcd
PythonPackage: fix missing import 2025-01-03 19:40:57 -06:00
Wouter Deconinck
7a4859721a
EnvironmentModifications.set_env(self, env) context manager 2025-01-03 19:35:53 -06:00
Wouter Deconinck
d4a28b4e22
PythonPackage: run test_imports in run env context 2025-01-03 19:30:48 -06:00

View File

@ -17,8 +17,10 @@
import llnl.util.tty as tty import llnl.util.tty as tty
from llnl.util.filesystem import HeaderList, LibraryList, join_path from llnl.util.filesystem import HeaderList, LibraryList, join_path
import spack.build_environment
import spack.builder import spack.builder
import spack.config import spack.config
import spack.context
import spack.deptypes as dt import spack.deptypes as dt
import spack.detection import spack.detection
import spack.multimethod import spack.multimethod
@ -237,7 +239,11 @@ def test_imports(self) -> None:
purpose=f"checking import of {module}", purpose=f"checking import of {module}",
work_dir="spack-test", work_dir="spack-test",
): ):
python("-c", f"import {module}") setup_context = spack.build_environment.SetupContext(
self.spec, context=spack.context.Context.RUN
)
mods = setup_context.get_env_modifications()
python("-c", f"import {module}", env=mods)
def update_external_dependencies(self, extendee_spec=None): def update_external_dependencies(self, extendee_spec=None):
""" """