blob: 782b2b6cfa7ee0d9cfd332b371995d906f7f3c20 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack import *
class Npm(AutotoolsPackage):
"""npm: A package manager for javascript."""
homepage = "https://github.com/npm/npm"
# base http://www.npmjs.com/
url = "https://registry.npmjs.org/npm/-/npm-3.10.5.tgz"
version('3.10.9', sha256='fb0871b1aebf4b74717a72289fade356aedca83ee54e7386e38cb51874501dd6')
version('3.10.5', sha256='ff019769e186152098841c1fa6325e5a79f7903a45f13bd0046a4dc8e63f845f')
depends_on('node-js', type=('build', 'run'))
def setup_dependent_build_environment(self, 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)
env.set('npm_config_cache', npm_config_cache_dir)
def setup_dependent_run_environment(self, 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)
env.set('npm_config_cache', npm_config_cache_dir)
|