summaryrefslogtreecommitdiff
path: root/lib/spack/docs/packaging_guide.rst
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2017-01-25 16:57:01 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2017-01-25 08:57:01 -0700
commitfc866ae0fe960abf723d5f89c2ae6c6baaa3ce5e (patch)
treeebcb8358d513dfce29c349493a2d735bb85a501f /lib/spack/docs/packaging_guide.rst
parent90d47a3eadb5f9b3f90a790c276f8ca5a90c81a1 (diff)
downloadspack-fc866ae0fe960abf723d5f89c2ae6c6baaa3ce5e.tar.gz
spack-fc866ae0fe960abf723d5f89c2ae6c6baaa3ce5e.tar.bz2
spack-fc866ae0fe960abf723d5f89c2ae6c6baaa3ce5e.tar.xz
spack-fc866ae0fe960abf723d5f89c2ae6c6baaa3ce5e.zip
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
Diffstat (limited to 'lib/spack/docs/packaging_guide.rst')
-rw-r--r--lib/spack/docs/packaging_guide.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index f3927a0709..9b08a7d498 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -2775,17 +2775,17 @@ any base class listed in :ref:`installation_procedure`.
.. code-block:: python
- @MakefilePackage.sanity_check('build')
- @MakefilePackage.on_package_attributes(run_tests=True)
+ @run_after('build')
+ @on_package_attributes(run_tests=True)
def check_build(self):
# Custom implementation goes here
pass
-The first decorator ``MakefilePackage.sanity_check('build')`` schedules this
+The first decorator ``run_after('build')`` schedules this
function to be invoked after the ``build`` phase has been executed, while the
second one makes the invocation conditional on the fact that ``self.run_tests == True``.
It is also possible to schedule a function to be invoked *before* a given phase
-using the ``MakefilePackage.precondition`` decorator.
+using the ``run_before`` decorator.
.. note::