From e5bd79b011f3a1e1bafac11b1c372ecf1cbadde9 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Wed, 26 Jun 2024 07:18:40 -0700 Subject: py-jcb: new package (#44880) * Add py-jcb: JEDI Configuration Builder * Update maintainers --- var/spack/repos/builtin/packages/py-jcb/package.py | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-jcb/package.py diff --git a/var/spack/repos/builtin/packages/py-jcb/package.py b/var/spack/repos/builtin/packages/py-jcb/package.py new file mode 100644 index 0000000000..a13c134b3c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-jcb/package.py @@ -0,0 +1,39 @@ +# 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 PyJcb(PythonPackage): + """ + JEDI Configuration Builder + """ + + homepage = "https://github.com/NOAA-EMC/jcb" + git = "https://github.com/NOAA-EMC/jcb" + + maintainers("danholdaway", "CoryMartin-NOAA", "AlexanderRichert-NOAA") + + license("GPL-3.0-only", checked_by="AlexanderRichert-NOAA") + + version("develop", branch="develop", commit="16399323e36df6f17bfd4740a2330ca7fae31537") + + depends_on("python@3.6:", type=("build", "run")) + depends_on("py-setuptools", type="build") + + depends_on("py-pyyaml@6:", type=("build", "run")) + depends_on("py-jinja2@3.1.2:", type=("build", "run")) + depends_on("py-click@8:", type=("build", "run")) + + depends_on("py-pytest@7:", type="test") + + @run_after("install") + @on_package_attributes(run_tests=True) + def check(self): + env["PYTHONPATH"] = ":".join( + (join_path(self.build_directory, "build/lib"), env["PYTHONPATH"]) + ) + pytest = which(join_path(self.spec["py-pytest"].prefix.bin, "pytest")) + pytest("-v", self.build_directory) -- cgit v1.2.3-70-g09d2