forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* geant4: add v11.3.0 * geant4: rm deprecated 11.3.0.beta * geant4: add 11.3.0 and associated data library versions - Data library versions taken from: - https://gitlab.cern.ch/geant4/geant4/-/blob/v11.3.0/cmake/Modules/G4DatasetDefinitions.cmake?ref_type=tags - Variants etc otherwise unchanged. - 11.3.0-beta version removed, release version marked as preffered. * g4channeling: f-strings --------- Co-authored-by: Ben Morgan <ben.morgan@warwick.ac.uk> Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
- Loading branch information
1 parent
728c5e0
commit 12dd120
Showing
8 changed files
with
51 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright 2013-2024 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) | ||
|
||
|
||
from spack.package import * | ||
|
||
|
||
class G4channeling(Package): | ||
"""Geant4 data for solid state crystal channeling""" | ||
|
||
homepage = "https://geant4.web.cern.ch" | ||
url = "https://geant4-data.web.cern.ch/geant4-data/datasets/G4CHANNELING.1.0.tar.gz" | ||
|
||
tags = ["hep"] | ||
|
||
maintainers("drbenmorgan") | ||
|
||
# Only versions relevant to Geant4 releases built by spack are added | ||
version("1.0", sha256="203e3c69984ca09acd181a1d31a9b0efafad4bc12e6c608f0b05e695120d67f2") | ||
|
||
def install(self, spec, prefix): | ||
mkdirp(join_path(prefix.share, "data")) | ||
install_path = join_path(prefix.share, "data", self.g4datasetname) | ||
install_tree(self.stage.source_path, install_path) | ||
|
||
def setup_dependent_run_environment(self, env, dependent_spec): | ||
install_path = join_path(self.prefix.share, "data", self.g4datasetname) | ||
env.set("G4CHANNELINGDATA", install_path) | ||
|
||
def url_for_version(self, version): | ||
"""Handle version string.""" | ||
return f"http://geant4-data.web.cern.ch/geant4-data/datasets/G4CHANNELING.{version}.tar.gz" | ||
|
||
@property | ||
def g4datasetname(self): | ||
return f"G4CHANNELING{self.spec.version}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters