build systems: simpler, clearer decorators: run_after, run_before (#2860)
* PackageMeta: `run_before` is an alias of `precondition`, `run_after` an alias of `sanity_check` * PackageMeta: removed `precondition` and `sanity_check` * PackageMeta: decorators are now free-standing * package: modified/added docstrings. Fixed the semantics of `on_package_attributes`. * package: added unit test assertion as side effects of install * build_systems: factored build-time test running into base class * r: updated decorators in package.py * docs: updated decorator names
This commit is contained in:

committed by
Todd Gamblin

parent
90d47a3ead
commit
fc866ae0fe
@@ -68,7 +68,7 @@ def blas_libs(self):
|
||||
def lapack_libs(self):
|
||||
return self.blas_libs
|
||||
|
||||
@MakefilePackage.precondition('edit')
|
||||
@run_before('edit')
|
||||
def check_compilers(self):
|
||||
# As of 06/2016 there is no mechanism to specify that packages which
|
||||
# depends on Blas/Lapack need C or/and Fortran symbols. For now
|
||||
@@ -126,7 +126,7 @@ def build_targets(self):
|
||||
|
||||
return self.make_defs + targets
|
||||
|
||||
@MakefilePackage.sanity_check('build')
|
||||
@run_after('build')
|
||||
def check_build(self):
|
||||
make('tests', *self.make_defs)
|
||||
|
||||
@@ -138,7 +138,7 @@ def install_targets(self):
|
||||
]
|
||||
return make_args + self.make_defs
|
||||
|
||||
@MakefilePackage.sanity_check('install')
|
||||
@run_after('install')
|
||||
def check_install(self):
|
||||
spec = self.spec
|
||||
# Openblas may pass its own test but still fail to compile Lapack
|
||||
|
Reference in New Issue
Block a user