Massive conversion from Package to AutotoolsPackage (#2845)

* Massive conversion from Package to AutotoolsPackage

* Forgot to convert p4est to AutotoolsPackage

* Fix typo

* Fix broken link in docs
This commit is contained in:
Adam J. Stewart
2017-01-18 12:34:09 -06:00
committed by Todd Gamblin
parent 5812081b80
commit 02f92fc7f8
313 changed files with 384 additions and 2119 deletions

View File

@@ -26,7 +26,7 @@
from spack import *
class Npm(Package):
class Npm(AutotoolsPackage):
"""npm: A package manager for javascript."""
homepage = "https://github.com/npm/npm"
@@ -37,18 +37,10 @@ class Npm(Package):
version('3.10.5', '46002413f4a71de9b0da5b506bf1d992')
depends_on('node-js')
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
npm_config_cache_dir = "%s/npm-cache" % dependent_spec.prefix
if not os.path.isdir(npm_config_cache_dir):
mkdir(npm_config_cache_dir)
run_env.set('npm_config_cache', npm_config_cache_dir)
spack_env.set('npm_config_cache', npm_config_cache_dir)
def install(self, spec, prefix):
configure('--prefix={0}'.format(prefix))
if self.run_tests:
make('test')
make('install')