Merge pull request #732 from citibeth/efischer/160403-ConditionalExtendsBugfix

[Needs Review] Fix conditional extends (BUG #683)
This commit is contained in:
Todd Gamblin 2016-04-04 10:21:26 -07:00
commit c7b11360e9

View file

@ -163,9 +163,14 @@ def write(self):
# package-specific modifications
spack_env = EnvironmentModifications()
for item in self.pkg.extendees:
package = self.spec[item].package
package.setup_dependent_package(self.pkg.module, self.spec)
package.setup_dependent_environment(spack_env, env, self.spec)
try:
package = self.spec[item].package
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
self.spec.package.setup_environment(spack_env, env)