py-amici, py-python-libsbml: new packages (#35532)

* py-amici, py-python-libsbml: new packages

* Apply suggestions from code review

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

* Swig and cmake are build-only dependencies

* cmake as a run dependency after all

* py-amici: default boost and hdf5 variants to True

---------

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
Erik Heeren 2023-05-04 18:19:48 +02:00 committed by GitHub
parent a5300b5726
commit 8e73eeb4b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,45 @@
# Copyright 2013-2023 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 PyAmici(PythonPackage):
"""Advanced Multilanguage Interface for CVODES and IDAS"""
homepage = "https://github.com/AMICI-dev/AMICI"
pypi = "amici/amici-0.11.28.tar.gz"
version("0.16.0", sha256="1a2d6633ec34241d8d8b496d18d4318482cffe125e9ddf3ca6cac5d36d235f38")
version("0.11.28", sha256="a8ddda70d8ebdc40600b4ad2ea02eb26e765ca0e594b957f61866b8c84255d5b")
variant("boost", default=True, description="Enable boost support")
variant("hdf5", default=True, description="Enable HDF5 support")
depends_on("py-setuptools@48:", type=("build", "run"))
depends_on("blas", type=("build", "run"))
depends_on("boost", when="+boost", type=("build", "run"))
depends_on("hdf5", when="+hdf5", type=("build", "run"))
depends_on("swig@3.0:", type=("build", "run"))
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-sympy@1.9:", type=("build", "run"))
depends_on("py-numpy@1.17.5:", when="^python@3.8", type=("build", "run"))
depends_on("py-numpy@1.19.3:", when="^python@3.9", type=("build", "run"))
depends_on("py-numpy@1.21.4:", when="^python@3.10:", type=("build", "run"))
depends_on("py-python-libsbml", type=("build", "run"))
depends_on("py-h5py", type=("build", "run"))
depends_on("py-pandas", type=("build", "run"))
depends_on("py-pkgconfig", type=("build", "run"))
depends_on("py-wurlitzer", type=("build", "run"))
depends_on("py-toposort", type=("build", "run"))
depends_on("py-mpmath", when="@0.16.0:", type=("build", "run"))
def setup_run_environment(self, env):
env.set("BLAS_LIBS", " ".join(self.spec["blas"].libs))
def setup_build_environment(self, env):
env.set("BLAS_LIBS", " ".join(self.spec["blas"].libs))

View File

@ -0,0 +1,23 @@
# Copyright 2013-2023 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 PyPythonLibsbml(PythonPackage):
"""LibSBML is a library for reading, writing and manipulating the Systems Biology
Markup Language (SBML)."""
homepage = "https://sbml.org/"
git = "https://github.com/sbmlteam/python-libsbml.git"
pypi = "python-libsbml/python-libsbml-5.19.7.tar.gz"
version("5.19.7", sha256="447b1fde7aceccd11a93dc9f589ffd9319ba854d7b7583f911259a8b0127ab7b")
version("5.19.5", tag="v5.19.5", submodules=True)
depends_on("py-setuptools", type="build")
depends_on("swig", type="build")
depends_on("cmake", type=("build", "run"))