Add a WafPackage base class (#3975)

* Add a WafPackage base class

* Correct comment in docstring

* Be more specific about the Python versions supported
This commit is contained in:
Adam J. Stewart
2017-05-01 10:00:09 -05:00
committed by Todd Gamblin
parent b3ce04cba3
commit 2511520b32
9 changed files with 220 additions and 47 deletions

View File

@@ -25,7 +25,7 @@
from spack import *
class Tut(Package):
class Tut(WafPackage):
"""TUT is a small and portable unit test framework for C++."""
homepage = "http://mrzechonek.github.io/tut-framework/"
@@ -33,9 +33,11 @@ class Tut(Package):
version('2016-12-19', '8b1967fa295ae1ce4d4431c2f811e521')
extends('python')
def build_args(self, spec, prefix):
args = []
def install(self, spec, prefix):
python('waf', 'configure', '--prefix={0}'.format(prefix))
python('waf', 'build')
python('waf', 'install')
if self.run_tests:
# Run unit tests
args.append('--test')
return args