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
This commit is contained in:
Patrick Gartung 2019-08-02 13:48:35 -05:00 committed by GitHub
parent 023de09134
commit 9cf6aece85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 32 additions and 37 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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)

View File

@ -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):

View File

@ -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):