From 641adae961253c7627776a9bf67b594a43a185b0 Mon Sep 17 00:00:00 2001 From: Marco De La Pierre Date: Thu, 8 Dec 2022 10:07:30 +0800 Subject: 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 * 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 --- .../repos/builtin/packages/py-spython/package.py | 31 +++++++++++++ .../builtin/packages/singularity-hpc/package.py | 54 ++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-spython/package.py create mode 100644 var/spack/repos/builtin/packages/singularity-hpc/package.py (limited to 'var') 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") -- cgit v1.2.3-70-g09d2