diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/lhapdfsets/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/lhapdfsets/package.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/lhapdfsets/package.py b/var/spack/repos/builtin/packages/lhapdfsets/package.py index f6d8f5905b..996eda271c 100644 --- a/var/spack/repos/builtin/packages/lhapdfsets/package.py +++ b/var/spack/repos/builtin/packages/lhapdfsets/package.py @@ -16,11 +16,13 @@ class Lhapdfsets(BundlePackage): tags = ["hep"] - maintainers("vvolkl") + maintainers("vvolkl", "wdconinc") version("6.3.0") depends_on("lhapdf", type="build") + depends_on("tar", type="build") + depends_on("curl", type="build") phases = ["install"] @@ -36,7 +38,8 @@ class Lhapdfsets(BundlePackage): def install(self, spec, prefix): mkdirp(self.prefix.share.lhapdfsets) - lhapdf = which("lhapdf") + tar = which("tar") + curl = which("curl") sets = self.spec.variants["sets"].value if sets == "all": # parse set names from index file @@ -50,7 +53,17 @@ class Lhapdfsets(BundlePackage): elif sets == "default": default_sets = ["MMHT2014lo68cl", "MMHT2014nlo68cl", "CT14lo", "CT14nlo"] sets = default_sets - lhapdf("--pdfdir=" + self.prefix.share.lhapdfsets, "install", *sets) + with working_dir(self.prefix.share.lhapdfsets): + for s in sets: + _filename = "%s.tar.gz" % s + curl( + "-L", + "-o", + _filename, + "http://lhapdfsets.web.cern.ch/lhapdfsets/current/%s" % _filename, + ) + tar("xfz", _filename) + os.remove(_filename) def setup_dependent_build_environment(self, env, dependent_spec): env.set("LHAPDF_DATA_PATH", self.prefix.share.lhapdfsets) |