Skip to content

Commit

Permalink
Merge pull request #444 from AlexanderRichert-NOAA/add_wxflow_jcsda
Browse files Browse the repository at this point in the history
py-wxflow: new package (spack#44754)
  • Loading branch information
climbfuji authored Jul 9, 2024
2 parents e5274e9 + e3b84a5 commit 0605595
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions var/spack/repos/builtin/packages/py-wxflow/package.py
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)

0 comments on commit 0605595

Please sign in to comment.