diff options
author | Alex Richert <alexander.richert@noaa.gov> | 2024-06-19 15:19:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-19 16:19:31 -0600 |
commit | 70a93a746d15db94483c81b0fa083c9fb35116f1 (patch) | |
tree | c511acb436319b1d804720daf42b152c53ff6595 /var | |
parent | 4326efddbff8e0716af867763c14af19eb0302a7 (diff) | |
download | spack-70a93a746d15db94483c81b0fa083c9fb35116f1.tar.gz spack-70a93a746d15db94483c81b0fa083c9fb35116f1.tar.bz2 spack-70a93a746d15db94483c81b0fa083c9fb35116f1.tar.xz spack-70a93a746d15db94483c81b0fa083c9fb35116f1.zip |
py-wxflow: new package (#44754)
* Add py-wxflow, a set of tools used in weather workflows
* Update package.py
* add 0.2.0
* add unit testing
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/py-wxflow/package.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-wxflow/package.py b/var/spack/repos/builtin/packages/py-wxflow/package.py new file mode 100644 index 0000000000..969453b4a7 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-wxflow/package.py @@ -0,0 +1,46 @@ +# 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 PyWxflow(PythonPackage): + """ + Common set of tools used in weather workflows. + See https://wxflow.readthedocs.io/en/latest/ for documentation. + """ + + homepage = "https://github.com/NOAA-EMC/wxflow" + pypi = "wxflow/wxflow-0.1.0.tar.gz" + + maintainers("aerorahul", "WalterKolczynski-NOAA", "AlexanderRichert-NOAA") + + license("LGPL-3.0-only", checked_by="AlexanderRichert-NOAA") + + version("0.2.0", sha256="a0fa903c6bb65e2cfa9deebcc8ec03d8eced82eac54288e73bd9137fcc0457d4") + version("0.1.0", sha256="4de120688affd7589bd9df0288139d16e97a93bc37efcfaf09fccc1c6ed43ab1") + + depends_on("python@3.6:", type=("build", "run")) + depends_on("py-setuptools", type="build") + + depends_on("py-numpy@1.21.6:", type=("build", "run")) + depends_on("py-pyyaml@6:", type=("build", "run")) + depends_on("py-jinja2@3.1.2:", type=("build", "run")) + + depends_on("py-pytest", type="test") + + @on_package_attributes(run_tests=True) + def patch(self): + # Disable code coverage generation + filter_file(r"\s\-\-cov[^\s]+", "", "setup.cfg") + + @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) |