From 09810a5e7c08537d19ffb1214a48e68c1449a10c Mon Sep 17 00:00:00 2001 From: downloadico Date: Thu, 21 Mar 2024 12:11:14 -0600 Subject: [PATCH] py-cig-pythia: add py-cig-pythia package to spack (#43294) --- .../builtin/packages/py-cig-pythia/package.py | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-cig-pythia/package.py 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 00000000000..f80423d86e2 --- /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