summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMarco De La Pierre <marco.delapierre@gmail.com>2022-12-08 10:07:30 +0800
committerGitHub <noreply@github.com>2022-12-07 20:07:30 -0600
commit641adae961253c7627776a9bf67b594a43a185b0 (patch)
tree7f517acb5e82b0d16890180d3f4ba3d3b15714b6 /var
parentaed77efb9a098fb7269a9c0fedc189d1415f9c54 (diff)
downloadspack-641adae961253c7627776a9bf67b594a43a185b0.tar.gz
spack-641adae961253c7627776a9bf67b594a43a185b0.tar.bz2
spack-641adae961253c7627776a9bf67b594a43a185b0.tar.xz
spack-641adae961253c7627776a9bf67b594a43a185b0.zip
Add recipe for singularity-hpc, py-spython (#34234)
* adding recipe for singularity-hpc - 1st go * typo in singularity-hpc recipe * singularity-hpc, spython recipes: added platform variant * singularity-hpc, spython recipes: platform variant renamed to runtime * style fix * another style fix * yet another style fix (why are they not reported altogether) * singularity-hpc recipe: added Vanessa as maintainer * singularity-hpc recipe: add podman variant * singularity-hpc recipe: added variant for module system * shpc recipe: add version for py-semver dependency Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * py-spython recipe: no need to specify generic python dep for a python pkg * py-spython: py-requests not needed Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-spython/package.py31
-rw-r--r--var/spack/repos/builtin/packages/singularity-hpc/package.py54
2 files changed, 85 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-spython/package.py b/var/spack/repos/builtin/packages/py-spython/package.py
new file mode 100644
index 0000000000..6b11a4e871
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-spython/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2022 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 PySpython(PythonPackage):
+ """The Python API for working with Singularity containers."""
+
+ homepage = "https://github.com/singularityhub/singularity-cli"
+ pypi = "spython/spython-0.2.14.tar.gz"
+
+ version("0.2.14", sha256="49e22fbbdebe456b27ca17d30061489db8e0f95e62be3623267a23b85e3ce0f0")
+
+ variant(
+ "runtime",
+ default="none",
+ description="Container runtime installed by Spack for this package",
+ values=("none", "singularityce", "singularity"),
+ multi=False,
+ )
+
+ depends_on("singularityce@3.5.2:", when="runtime=singularityce", type="run")
+ depends_on("singularity@3.5.2:", when="runtime=singularity", type="run")
+
+ depends_on("py-setuptools", type="build")
+
+ depends_on("py-semver@2.8.1:", type=("build", "run"))
diff --git a/var/spack/repos/builtin/packages/singularity-hpc/package.py b/var/spack/repos/builtin/packages/singularity-hpc/package.py
new file mode 100644
index 0000000000..e351e6dcb7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/singularity-hpc/package.py
@@ -0,0 +1,54 @@
+# Copyright 2013-2022 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 SingularityHpc(PythonPackage):
+ """Local filesystem registry for containers (intended for HPC)
+ using Lmod or Environment Modules. Works for users and admins.
+ """
+
+ maintainers = ["marcodelapierre", "vsoch"]
+
+ homepage = "https://github.com/singularityhub/singularity-hpc"
+ pypi = "singularity-hpc/singularity-hpc-0.1.16.tar.gz"
+
+ version("0.1.16", sha256="00aca234259b962914987ec725181dafc11096fa721d610485615585753d769f")
+ version("0.1.12", sha256="760cbcae7b07b319ff6147938578648ce6f0af760701e62bf5f88649ef08f793")
+
+ variant(
+ "runtime",
+ default="none",
+ description="Container runtime installed by Spack for this package",
+ values=("none", "singularityce", "singularity", "podman"),
+ multi=False,
+ )
+
+ variant(
+ "modules",
+ default="none",
+ description="Module system installed by Spack for this package",
+ values=("none", "lmod", "environment-modules"),
+ multi=False,
+ )
+
+ depends_on("python@3.3:", type=("build", "run"))
+ depends_on("py-setuptools", type="build")
+ depends_on("py-pytest-runner", type="build")
+
+ depends_on("py-spython@0.2.0:", type=("build", "run"))
+ depends_on("py-jinja2", type=("build", "run"))
+ depends_on("py-jsonschema", type=("build", "run"))
+ depends_on("py-ruamel-yaml", type=("build", "run"))
+ depends_on("py-requests", type=("build", "run"))
+
+ depends_on("singularityce@3:", when="runtime=singularityce", type="run")
+ depends_on("singularity@3:", when="runtime=singularity", type="run")
+ depends_on("podman", when="runtime=podman", type="run")
+
+ depends_on("lmod", when="modules=lmod", type="run")
+ depends_on("environment-modules", when="modules=environment-modules", type="run")