summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordownloadico <download@carc.unm.edu>2024-03-21 12:11:14 -0600
committerGitHub <noreply@github.com>2024-03-21 11:11:14 -0700
commit09810a5e7c08537d19ffb1214a48e68c1449a10c (patch)
tree7faec089308a136b271c0627a7b087f0d14ec149
parent446c0f232528ddfde812f084d64b6cbe239c9992 (diff)
downloadspack-09810a5e7c08537d19ffb1214a48e68c1449a10c.tar.gz
spack-09810a5e7c08537d19ffb1214a48e68c1449a10c.tar.bz2
spack-09810a5e7c08537d19ffb1214a48e68c1449a10c.tar.xz
spack-09810a5e7c08537d19ffb1214a48e68c1449a10c.zip
py-cig-pythia: add py-cig-pythia package to spack (#43294)
-rw-r--r--var/spack/repos/builtin/packages/py-cig-pythia/package.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-cig-pythia/package.py b/var/spack/repos/builtin/packages/py-cig-pythia/package.py
new file mode 100644
index 0000000000..f80423d86e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-cig-pythia/package.py
@@ -0,0 +1,43 @@
+# 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 PyCigPythia(AutotoolsPackage, PythonExtension):
+ """This is the Computational Infrastructure for Geodynamics (CIG) fork of
+ Pythia/Pyre originally written by Michael Aivazis (California Institute of Technology).
+
+ Pythia/Pyre provides a Python framework for scientific simulations. This
+ fork focuses (and maintains) functionality for:
+
+ specification of simulation parameters
+ specification of units and unit conversions
+ user-friendly interface to popular batch job schedulers
+ Python and C++ interfaces for logging"""
+
+ homepage = "https://github.com/geodynamics/pythia/"
+ url = "https://github.com/geodynamics/pythia/releases/download/v1.1.0/pythia-1.1.0.tar.gz"
+
+ license("BSD-3-Clause", checked_by="downloadico")
+
+ version("1.1.0", sha256="d8e941d2d0fa4772c3c0cb3d1d9b6acbb5fa01ef346dc0706a8da541a8f97731")
+
+ variant("mpi", default=True, description="Build with MPI support.")
+
+ depends_on("mpi", when="+mpi")
+ depends_on("python@3.8:")
+ depends_on("py-pip")
+
+ def configure_args(self):
+ spec = self.spec
+ args = []
+ if "+mpi" in spec:
+ args.append("--enable-mpi")
+ args.append(f"CC={spec['mpi'].mpicc}")
+ args.append(f"CXX={spec['mpi'].mpicxx}")
+ else:
+ args.append("--disable-mpi")
+ return args