Skip to content

Commit

Permalink
Add pydbsim and pymadx to the stack (#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Nov 19, 2024
1 parent f6b94a4 commit 0d22471
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/key4hep-stack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ class Key4hepStack(BundlePackage, Key4hepPackage):
depends_on("sherpa", when="+generators")
depends_on("sherpa2", when="+generators")

depends_on("py-pybdsim", when="+generators")
depends_on("py-pymadx", when="+generators")
depends_on("py-pytransport", when="+generators")

depends_on("ilcsoft")

depends_on("fccsw")
Expand Down
39 changes: 39 additions & 0 deletions packages/py-pybdsim/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2013-2021 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)


class PyPybdsim(PythonPackage):
"""Utilities for preparing and analysing BDSIM input and output as well as controlling BDSIM"""

homepage = "https://bitbucket.org/jairhul/pybdsim"
url = "https://bitbucket.org/jairhul/pybdsim/get/v3.6.1.tar.gz"
git = "https://bitbucket.org/jairhul/pybdsim.git"

tags = ["hep"]

maintainers = ["jmcarcell"]

version("master", branch="master")

version(
"3.6.1",
sha256="7bb7ba5d0f911dfc0115dce5b4a946743b34971836ef4112b2ede2195826cc11",
)

depends_on("py-setuptools", type="build")
depends_on("py-importlib-resources", type=("build", "run"))

depends_on("py-matplotlib@3:")
depends_on("[email protected]:")
depends_on("py-importlib-metadata")
depends_on("py-scipy")
depends_on("py-fortranformat")
depends_on("py-jinja2")

depends_on("py-pymadx")
depends_on("py-pytransport")

def setup_run_environment(self, env):
env.prepend_path("PYTHONPATH", self.spec["py-importlib-resources"].prefix.lib)
29 changes: 29 additions & 0 deletions packages/py-pymadx/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2013-2021 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)


class PyPymadx(PythonPackage):
"""Utilities for processing and analysing MADX output"""

homepage = "https://bitbucket.org/jairhul/pymadx"
url = "https://bitbucket.org/jairhul/pymadx/get/v2.2.1.tar.gz"
git = "https://bitbucket.org/jairhul/pymadx.git"

tags = ["hep"]

maintainers = ["jmcarcell"]

version("master", branch="master")

version(
"2.2.1",
sha256="e329204931de9be8b0ab88e7ba92045136165c382f8de02f0e11364671813276",
)

depends_on("py-setuptools", type="build")
depends_on("py-matplotlib@3:")
depends_on("[email protected]:")
depends_on("py-importlib-metadata")
depends_on("py-tabulate")
30 changes: 30 additions & 0 deletions packages/py-pytransport/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2013-2021 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)


class PyPytransport(PythonPackage):
"""A Python based converter for TRANSPORT files to BDSIM readable gmad files"""

homepage = "https://bitbucket.org/jairhul/pytransport"
url = "https://bitbucket.org/jairhul/pytransport/get/v2.0.2.tar.gz"
git = "https://bitbucket.org/jairhul/pytransport.git"

tags = ["hep"]

maintainers = ["jmcarcell"]

version("master", branch="master")

version(
"2.0.2",
sha256="61b2c6dd6d0a682a3499a396114c9f6815513f7d4e737a6c67e2d88f68046f00",
)

depends_on("py-setuptools", type="build")

depends_on("py-matplotlib@3:")
depends_on("[email protected]:")
depends_on("py-importlib-metadata")
depends_on("py-scipy")

0 comments on commit 0d22471

Please sign in to comment.