forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #444 from AlexanderRichert-NOAA/add_wxflow_jcsda
py-wxflow: new package (spack#44754)
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("[email protected]:", type=("build", "run")) | ||
depends_on("py-setuptools", type="build") | ||
|
||
depends_on("[email protected]:", type=("build", "run")) | ||
depends_on("py-pyyaml@6:", type=("build", "run")) | ||
depends_on("[email protected]:", 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) |