package.py : extra arguments, fixed inheritance issue

- added attribute to hold extra arguments in PackageBase instances
- fixed registration from within packages
- examples : hdf5, lzo
This commit is contained in:
alalazo
2016-07-12 21:28:09 +02:00
parent 813cb032c4
commit 97c2224cd6
3 changed files with 40 additions and 21 deletions

View File

@@ -25,7 +25,7 @@
from spack import *
class Lzo(Package):
class Lzo(AutotoolsPackage):
"""Real-time data compression library"""
homepage = 'https://www.oberhumer.com/opensource/lzo/'
@@ -37,13 +37,13 @@ class Lzo(Package):
version('2.06', '95380bd4081f85ef08c5209f4107e9f8')
version('2.05', 'c67cda5fa191bab761c7cb06fe091e36')
def install(self, spec, prefix):
configure_args = [
'--prefix={0}'.format(prefix),
def configure_args(self):
return [
'--disable-dependency-tracking',
'--enable-shared'
]
configure(*configure_args)
make()
make('check')
make('install')
@AutotoolsPackage.sanity_check('build')
def check(self):
if self.extra_args.get('build-tests', False):
make('check')