Handle test dependencies that are python extensions (#6904)
See #6794 This fixes cases where test-only dependencies were omitted from consideration when modifying the environment at build time. This includes an update to the python package definition to add testing-related python extensions to its specialized environment setup.
This commit is contained in:
parent
761b8f76d2
commit
278901c02c
2 changed files with 3 additions and 2 deletions
|
@ -581,7 +581,8 @@ def setup_package(pkg, dirty):
|
|||
|
||||
# traverse in postorder so package can use vars from its dependencies
|
||||
spec = pkg.spec
|
||||
for dspec in pkg.spec.traverse(order='post', root=False, deptype='build'):
|
||||
for dspec in pkg.spec.traverse(order='post', root=False,
|
||||
deptype=('build', 'test')):
|
||||
# If a user makes their own package repo, e.g.
|
||||
# spack.repos.mystuff.libelf.Libelf, and they inherit from
|
||||
# an existing class like spack.repos.original.libelf.Libelf,
|
||||
|
|
|
@ -509,7 +509,7 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
|
|||
|
||||
python_paths = []
|
||||
for d in dependent_spec.traverse(
|
||||
deptype=('build', 'run'), deptype_query='run'):
|
||||
deptype=('build', 'run', 'test')):
|
||||
if d.package.extends(self.spec):
|
||||
python_paths.append(join_path(d.prefix,
|
||||
self.site_packages_dir))
|
||||
|
|
Loading…
Reference in a new issue