Skip to content
Snippets Groups Projects
Commit 2f4d8a63 authored by Elizabeth Fischer's avatar Elizabeth Fischer
Browse files

Fix conditional extends (BUG #683)

parent f5a77d39
No related branches found
No related tags found
No related merge requests found
...@@ -163,9 +163,14 @@ def write(self): ...@@ -163,9 +163,14 @@ def write(self):
# package-specific modifications # package-specific modifications
spack_env = EnvironmentModifications() spack_env = EnvironmentModifications()
for item in self.pkg.extendees: for item in self.pkg.extendees:
package = self.spec[item].package try:
package.setup_dependent_package(self.pkg.module, self.spec) package = self.spec[item].package
package.setup_dependent_environment(spack_env, env, self.spec) package.setup_dependent_package(self.pkg.module, self.spec)
package.setup_dependent_environment(spack_env, env, self.spec)
except:
# The extends was conditional, so it doesn't count here
# eg: extends('python', when='+python')
pass
# Package-specific environment modifications # Package-specific environment modifications
self.spec.package.setup_environment(spack_env, env) self.spec.package.setup_environment(spack_env, env)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment