summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Gartung <gartung@fnal.gov>2019-08-02 13:48:35 -0500
committerGitHub <noreply@github.com>2019-08-02 13:48:35 -0500
commit9cf6aece85fd7289c3bdb955eb7c1619ba1d4a4f (patch)
tree9a0391fa9783e9e989f8881a082ebd5f2aaeabdc
parent023de09134019cf9cdb27fcdc90c650ef499881b (diff)
downloadspack-9cf6aece85fd7289c3bdb955eb7c1619ba1d4a4f.tar.gz
spack-9cf6aece85fd7289c3bdb955eb7c1619ba1d4a4f.tar.bz2
spack-9cf6aece85fd7289c3bdb955eb7c1619ba1d4a4f.tar.xz
spack-9cf6aece85fd7289c3bdb955eb7c1619ba1d4a4f.zip
Geant4 data packages: Set the install path name explicitly. (#12244)
* Geant4 data packages: Set the install path name explicitly. * Use the correct directory name for g4photonevaporation,g4radioactivedecay,g4realsurface
-rw-r--r--var/spack/repos/builtin/packages/g4abla/package.py11
-rw-r--r--var/spack/repos/builtin/packages/g4emlow/package.py11
-rw-r--r--var/spack/repos/builtin/packages/g4ensdfstate/package.py5
-rw-r--r--var/spack/repos/builtin/packages/g4ndl/package.py5
-rw-r--r--var/spack/repos/builtin/packages/g4neutronxs/package.py5
-rw-r--r--var/spack/repos/builtin/packages/g4photonevaporation/package.py4
-rw-r--r--var/spack/repos/builtin/packages/g4pii/package.py5
-rw-r--r--var/spack/repos/builtin/packages/g4radioactivedecay/package.py5
-rw-r--r--var/spack/repos/builtin/packages/g4realsurface/package.py8
-rw-r--r--var/spack/repos/builtin/packages/g4saiddata/package.py5
-rw-r--r--var/spack/repos/builtin/packages/g4tendl/package.py5
11 files changed, 32 insertions, 37 deletions
diff --git a/var/spack/repos/builtin/packages/g4abla/package.py b/var/spack/repos/builtin/packages/g4abla/package.py
index 3cca976376..ecbedea255 100644
--- a/var/spack/repos/builtin/packages/g4abla/package.py
+++ b/var/spack/repos/builtin/packages/g4abla/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4abla(Package):
@@ -13,13 +12,15 @@ class G4abla(Package):
homepage = "http://geant4.web.cern.ch"
url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4ABLA.3.0.tar.gz"
- version('3.0', sha256='99fd4dcc9b4949778f14ed8364088e45fa4ff3148b3ea36f9f3103241d277014')
- version('3.1', sha256='7698b052b58bf1b9886beacdbd6af607adc1e099fc730ab6b21cf7f090c027ed')
+ version(
+ '3.0', sha256='99fd4dcc9b4949778f14ed8364088e45fa4ff3148b3ea36f9f3103241d277014')
+ version(
+ '3.1', sha256='7698b052b58bf1b9886beacdbd6af607adc1e099fc730ab6b21cf7f090c027ed')
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', 'G4ABLA{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/g4emlow/package.py b/var/spack/repos/builtin/packages/g4emlow/package.py
index d4b88c8a0f..3838fa5c74 100644
--- a/var/spack/repos/builtin/packages/g4emlow/package.py
+++ b/var/spack/repos/builtin/packages/g4emlow/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4emlow(Package):
@@ -13,13 +12,15 @@ class G4emlow(Package):
homepage = "http://geant4.web.cern.ch"
url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4EMLOW.6.50.tar.gz"
- version('6.50', sha256='c97be73fece5fb4f73c43e11c146b43f651c6991edd0edf8619c9452f8ab1236')
- version('7.3', sha256='583aa7f34f67b09db7d566f904c54b21e95a9ac05b60e2bfb794efb569dba14e')
+ version(
+ '6.50', sha256='c97be73fece5fb4f73c43e11c146b43f651c6991edd0edf8619c9452f8ab1236')
+ version(
+ '7.3', sha256='583aa7f34f67b09db7d566f904c54b21e95a9ac05b60e2bfb794efb569dba14e')
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', 'G4EMLOW{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/g4ensdfstate/package.py b/var/spack/repos/builtin/packages/g4ensdfstate/package.py
index ba2c370f25..6297c60c13 100644
--- a/var/spack/repos/builtin/packages/g4ensdfstate/package.py
+++ b/var/spack/repos/builtin/packages/g4ensdfstate/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4ensdfstate(Package):
@@ -18,8 +17,8 @@ class G4ensdfstate(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', 'G4ENSDFSTATE{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
diff --git a/var/spack/repos/builtin/packages/g4ndl/package.py b/var/spack/repos/builtin/packages/g4ndl/package.py
index 63cecd7fb7..76a9d7ad85 100644
--- a/var/spack/repos/builtin/packages/g4ndl/package.py
+++ b/var/spack/repos/builtin/packages/g4ndl/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4ndl(Package):
@@ -17,8 +16,8 @@ class G4ndl(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', 'G4NDL{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/g4neutronxs/package.py b/var/spack/repos/builtin/packages/g4neutronxs/package.py
index f6b4c53193..bc63982316 100644
--- a/var/spack/repos/builtin/packages/g4neutronxs/package.py
+++ b/var/spack/repos/builtin/packages/g4neutronxs/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4neutronxs(Package):
@@ -18,8 +17,8 @@ class G4neutronxs(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', 'G4NEUTRONXS{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/g4photonevaporation/package.py b/var/spack/repos/builtin/packages/g4photonevaporation/package.py
index aed7c91a67..3c98f36fcf 100644
--- a/var/spack/repos/builtin/packages/g4photonevaporation/package.py
+++ b/var/spack/repos/builtin/packages/g4photonevaporation/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4photonevaporation(Package):
@@ -19,7 +18,8 @@ class G4photonevaporation(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ 'PhotonEvaporation{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/g4pii/package.py b/var/spack/repos/builtin/packages/g4pii/package.py
index b2c5d7806c..cb1a52d3b6 100644
--- a/var/spack/repos/builtin/packages/g4pii/package.py
+++ b/var/spack/repos/builtin/packages/g4pii/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4pii(Package):
@@ -17,8 +16,8 @@ class G4pii(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', 'G4PII{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/g4radioactivedecay/package.py b/var/spack/repos/builtin/packages/g4radioactivedecay/package.py
index 2b86faca5a..aa04798bc8 100644
--- a/var/spack/repos/builtin/packages/g4radioactivedecay/package.py
+++ b/var/spack/repos/builtin/packages/g4radioactivedecay/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4radioactivedecay(Package):
@@ -18,8 +17,8 @@ class G4radioactivedecay(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', 'RadioactiveDecay{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/g4realsurface/package.py b/var/spack/repos/builtin/packages/g4realsurface/package.py
index a0594e0789..8f5746f96d 100644
--- a/var/spack/repos/builtin/packages/g4realsurface/package.py
+++ b/var/spack/repos/builtin/packages/g4realsurface/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4realsurface(Package):
@@ -19,10 +18,11 @@ class G4realsurface(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', 'RealSurface{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):
"""Handle version string."""
- return ("http://geant4-data.web.cern.ch/geant4-data/datasets/RealSurface.1.0.tar.gz" % version)
+ return "http://geant4-data.web.cern.ch/geant4-data/datasets/{0}RealSurface.{1}.tar.gz".format(
+ "G4" if version > Version('1.0') else "", version)
diff --git a/var/spack/repos/builtin/packages/g4saiddata/package.py b/var/spack/repos/builtin/packages/g4saiddata/package.py
index 83fd993bc8..928e7093fe 100644
--- a/var/spack/repos/builtin/packages/g4saiddata/package.py
+++ b/var/spack/repos/builtin/packages/g4saiddata/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4saiddata(Package):
@@ -17,8 +16,8 @@ class G4saiddata(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', 'G4SAIDDATA{0}'
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):
diff --git a/var/spack/repos/builtin/packages/g4tendl/package.py b/var/spack/repos/builtin/packages/g4tendl/package.py
index d02cee96d2..ee58b77282 100644
--- a/var/spack/repos/builtin/packages/g4tendl/package.py
+++ b/var/spack/repos/builtin/packages/g4tendl/package.py
@@ -5,7 +5,6 @@
from spack import *
-import os
class G4tendl(Package):
@@ -18,8 +17,8 @@ class G4tendl(Package):
def install(self, spec, prefix):
mkdirp(join_path(prefix.share, 'data'))
- install_path = join_path(prefix.share, 'data',
- os.path.basename(self.stage.source_path))
+ install_path = join_path(prefix.share, 'data', "G4TENDL{0}"
+ .format(self.version))
install_tree(self.stage.source_path, install_path)
def url_for_version(self, version):