Directive inheritance: laziness for the win (#2623)

* inheritance of directives: using meta-classes to inject attributes coming from directives into packages + lazy directives

* _dep_types -> dependency_types
* using a meta-class to inject directives into packages
* directives are lazy

fixes #2466

* directives.py: allows for multiple inheritance. Added blank lines as suggested by @tgamblin

* directives.py: added a test for simple inheritance of directives

* Minor improvement requested by @tgamblin

CMakePackage: importing names from spack.directives
directives: wrap __new__ to respect pep8

* Refactoring requested by @tgamblin

directives: removed global variables in favor of class variables. Simplified the interface for directives (they return a callable on a package or a list of them).
This commit is contained in:
Massimiliano Culpo
2016-12-28 21:37:02 +01:00
committed by Todd Gamblin
parent 857dac88c8
commit 17b13b161b
11 changed files with 282 additions and 203 deletions

View File

@@ -36,8 +36,6 @@ class YamlCpp(CMakePackage):
variant('fpic', default=False,
description='Build with position independent code')
depends_on('cmake', type='build')
depends_on('boost', when='@:0.5.3')
def cmake_args(self):