summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorChristian Glusa <cgcgcg@users.noreply.github.com>2023-11-11 15:24:12 -0700
committerGitHub <noreply@github.com>2023-11-11 16:24:12 -0600
commit15dcd3c65c6bbf36127c4cc4d0ed767c14d396b2 (patch)
treeb0a9eda708a3abef3f381380c06abb3f17cc8977 /var
parent49c2894def4877713aaddd4cae302705ab59eeba (diff)
downloadspack-15dcd3c65c6bbf36127c4cc4d0ed767c14d396b2.tar.gz
spack-15dcd3c65c6bbf36127c4cc4d0ed767c14d396b2.tar.bz2
spack-15dcd3c65c6bbf36127c4cc4d0ed767c14d396b2.tar.xz
spack-15dcd3c65c6bbf36127c4cc4d0ed767c14d396b2.zip
py-pynucleus: Add variant, modify dependencies (#41006)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-pynucleus/package.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/py-pynucleus/package.py b/var/spack/repos/builtin/packages/py-pynucleus/package.py
index c4f2f82b7a..4194bb2c60 100644
--- a/var/spack/repos/builtin/packages/py-pynucleus/package.py
+++ b/var/spack/repos/builtin/packages/py-pynucleus/package.py
@@ -19,6 +19,9 @@ class PyPynucleus(PythonPackage):
for ref in refs:
version(ref, branch=ref)
+ variant("examples", default=True, description="Install examples")
+ variant("tests", default=True, description="Install tests")
+
depends_on("python@3.10:", type=("build", "run"))
depends_on("py-mpi4py@2.0.0:", type=("build", "link", "run"))
depends_on("py-cython@0.29.32:", type=("build", "run"))
@@ -30,14 +33,14 @@ class PyPynucleus(PythonPackage):
depends_on("py-h5py", type=("build", "run"))
depends_on("py-tabulate", type=("build", "run"))
depends_on("py-pyyaml", type=("build", "run"))
- depends_on("py-matplotlib+latex", type=("build", "run"))
+ depends_on("py-matplotlib", type=("build", "run"))
depends_on("py-scikit-sparse", type=("build", "run"))
depends_on("py-modepy", type=("build", "run"))
depends_on("py-meshpy", type=("build", "run"))
depends_on("py-pytools", type=("build", "run"))
depends_on("py-psutil", type="run")
-
- variant("examples", default=True, description="Install examples")
+ depends_on("py-pytest", when="+tests", type="run")
+ depends_on("py-pytest-html", when="+tests", type="run")
import_modules = [
"PyNucleus",
@@ -64,5 +67,9 @@ class PyPynucleus(PythonPackage):
def install_additional_files(self):
spec = self.spec
prefix = self.prefix
- if "+examples" in spec:
+ if "+examples" in spec or "+tests" in spec:
install_tree("drivers", prefix.drivers)
+ if "+examples" in spec:
+ install_tree("examples", prefix.examples)
+ if "+tests" in spec:
+ install_tree("tests", prefix.tests)