Skip to content

Commit

Permalink
Add the pyhepmc package to the stack (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Nov 28, 2024
1 parent 8e13fad commit 1429e2d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/key4hep-stack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class Key4hepStack(BundlePackage, Key4hepPackage):
depends_on("py-pylint", when="+devtools")
depends_on("py-boto3", when="+devtools")
depends_on("py-gcovr", when="+devtools")
depends_on("py-pyhepmc", when="+devtools")
depends_on("py-h5py", when="+devtools")
depends_on("py-ipykernel", when="+devtools")
depends_on("py-ipython", when="+devtools")
Expand Down
37 changes: 37 additions & 0 deletions packages/py-pyhepmc/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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 PyPyhepmc(PythonPackage):
"""Python bindings for HepMC3"""

homepage = "https://github.com/scikit-hep/pyhepmc"
pypi = "pyhepmc/pyhepmc-2.14.0.tar.gz"
git = "https://github.com/scikit-hep/pyhepmc.git"

tags = ["hep"]

maintainers = ["jmcarcell"]

version("main", branch="main")

version(
"2.14.0",
sha256="17a6f941e4fa06d08a628990f6816d1da5e545d65f533e6f598740d2cb76ace4",
)

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

depends_on("hepmc3", type=("build", "run"))
depends_on("[email protected]:", type=("build", "run"))
depends_on("py-pybind11", type=("build", "run"))
# In v2.14.0 a dot command is run at import time to check which formats are supported
# The system dot on Alma 9 does not support any formats and importing fails so graphviz is required
depends_on("graphviz", type="run")

@run_before("install")
def use_external_pybind11(self):
filter_file("(EXTERNAL_PYBIND11.*) OFF", r"\1 ON", "CMakeLists.txt")

0 comments on commit 1429e2d

Please sign in to comment.