Various package updates from JCSDA spack-stack-dev: crtm, g2, grads, hdf, ip, met, metplus, py-kiwisolver, py-pyogrio, py-ruamel-yaml-clib, wgrib2 (#50108)
* Update crtm from jcsda/spack-stack-dev * Update grads from jcsda/spack-stack-dev * Update hdf from jcsda/spack-stack-dev * Update ip from jcsda/spack-stack-dev * Update met from jcsda/spack-stack-dev * Update metplus from jcsda/spack-stack-dev * Update py-kiwisolver from jcsda/spack-stack-dev * Update py-pyogrio from jcsda/spack-stack-dev * Update py-ruamel-yaml-clib from jcsda/spack-stack-dev * Update wgrib2 from jcsda/spack-stack-dev
This commit is contained in:
parent
ac08428f20
commit
7f8c5bd4ca
@ -2,6 +2,9 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import glob
|
||||
import os
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
@ -40,6 +43,7 @@ class Crtm(CMakePackage):
|
||||
depends_on("crtm-fix@2.3.0_emc", when="@2.3.0 +fix")
|
||||
depends_on("crtm-fix@2.4.0_emc", when="@=2.4.0 +fix")
|
||||
depends_on("crtm-fix@2.4.0.1_emc", when="@2.4.0.1 +fix")
|
||||
depends_on("crtm-fix@3.1.1", when="@3.1.1 +fix")
|
||||
|
||||
depends_on("ecbuild", type=("build"), when="@v2.3-jedi.4")
|
||||
depends_on("ecbuild", type=("build"), when="@v2.4-jedi.1")
|
||||
@ -51,7 +55,7 @@ class Crtm(CMakePackage):
|
||||
license("CC0-1.0")
|
||||
|
||||
version(
|
||||
"v3.1.1-build1", sha256="1ed49e594da5d3769cbaa52cc7fc19c1bb0325ee6324f6057227c31e2d95ca67"
|
||||
"3.1.1-build1", sha256="1ed49e594da5d3769cbaa52cc7fc19c1bb0325ee6324f6057227c31e2d95ca67"
|
||||
)
|
||||
version(
|
||||
"v3.1.0-skylabv8",
|
||||
@ -85,6 +89,8 @@ class Crtm(CMakePackage):
|
||||
def url_for_version(self, version):
|
||||
if version > Version("v3") or version >= Version("3"):
|
||||
fmtversion = str(version).replace("-build", "+build")
|
||||
if not fmtversion.startswith("v"):
|
||||
fmtversion = f"v{fmtversion}"
|
||||
return f"https://github.com/JCSDA/CRTMv3/archive/refs/tags/{fmtversion}.tar.gz"
|
||||
else:
|
||||
return f"https://github.com/JCSDA/crtm/archive/refs/tags/{version}.tar.gz"
|
||||
@ -101,3 +107,10 @@ def patch(self):
|
||||
)
|
||||
if not self.run_tests:
|
||||
filter_file(r"add_subdirectory\(test\)", "# disable testing", "CMakeLists.txt")
|
||||
|
||||
@when("@3.1.1-build1")
|
||||
@run_after("install")
|
||||
def cmake_config_softlinks(self):
|
||||
cmake_config_files = glob.glob(join_path(self.prefix, "cmake/crtm/*"))
|
||||
for srcpath in cmake_config_files:
|
||||
os.symlink(srcpath, join_path(self.prefix, "cmake", os.path.basename(srcpath)))
|
||||
|
@ -25,7 +25,7 @@ class Grads(AutotoolsPackage):
|
||||
|
||||
variant("geotiff", default=True, description="Enable GeoTIFF support")
|
||||
variant("shapefile", default=True, description="Enable Shapefile support")
|
||||
variant("grib2", default=True, description="Enable GRIB2 support")
|
||||
variant("grib2", default=True, description="Enable GRIB2 support with the g2c library.")
|
||||
variant("dap", default=False, description="Enable DAP support")
|
||||
|
||||
# TODO: This variant depends on the "simple X" library, which is no longer available
|
||||
@ -43,7 +43,7 @@ class Grads(AutotoolsPackage):
|
||||
depends_on("hdf5", when="+hdf5")
|
||||
depends_on("hdf", when="+hdf4")
|
||||
depends_on("netcdf-c", when="+netcdf")
|
||||
depends_on("g2c", when="+grib2")
|
||||
depends_on("g2c+pic", when="+grib2")
|
||||
depends_on("libgeotiff", when="+geotiff")
|
||||
depends_on("shapelib", when="+shapefile")
|
||||
depends_on("gadap", when="+dap")
|
||||
|
@ -96,7 +96,7 @@ class Hdf(AutotoolsPackage):
|
||||
sha256="49733dd6143be7b30a28d386701df64a72507974274f7e4c0a9e74205510ea72",
|
||||
when="@4.2.15:",
|
||||
)
|
||||
# https://github.com/NOAA-EMC/spack-stack/issues/317
|
||||
# https://github.com/jcsda/spack-stack/issues/317
|
||||
patch("hdfi_h_apple_m1.patch", when="@4.2.15: target=aarch64: platform=darwin")
|
||||
|
||||
@property
|
||||
@ -160,6 +160,7 @@ def flag_handler(self, name, flags):
|
||||
if (
|
||||
self.spec.satisfies("%clang@16:")
|
||||
or self.spec.satisfies("%apple-clang@15:")
|
||||
or self.spec.satisfies("%oneapi")
|
||||
or self.spec.satisfies("%gcc@14:")
|
||||
):
|
||||
flags.append("-Wno-error=implicit-int")
|
||||
@ -218,6 +219,15 @@ def cached_tests_work_dir(self):
|
||||
"""The working directory for cached test sources."""
|
||||
return join_path(self.test_suite.current_test_cache_dir, self.extra_install_tests)
|
||||
|
||||
@run_after("install")
|
||||
def remove_ncgen_ncdump(self):
|
||||
"""Remove binaries ncdump and ncgen. These get built and
|
||||
installed even if the netCDF API is turned off (known bug)."""
|
||||
if self.spec.satisfies("~netcdf"):
|
||||
exes_to_remove = ["ncdump", "ncgen"]
|
||||
for exe in exes_to_remove:
|
||||
os.remove(os.path.join(self.prefix.bin, exe))
|
||||
|
||||
@run_after("install")
|
||||
def setup_build_tests(self):
|
||||
"""Copy the build test files after the package is installed to an
|
||||
|
@ -17,6 +17,8 @@ class Ip(CMakePackage):
|
||||
maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA")
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("5.3.0", sha256="17dfcb52bab58d3f1bcbbdda5e76430020d963097139e1ba240bfc5fb5c5a5d1")
|
||||
version("5.2.0", sha256="2f7b44abcf24e448855f57d107db55d3d58cbc271164ba083491d0c07a7ea3d0")
|
||||
version("5.1.0", sha256="5279f11f4c12db68ece74cec392b7a2a6b5166bc505877289f34cc3149779619")
|
||||
version("5.0.0", sha256="54b2987bd4f94adc1f7595d2a384e646019c22d163bcd30840a916a6abd7df71")
|
||||
version("4.4.0", sha256="858d9201ce0bc4d16b83581ef94a4a0262f498ed1ea1b0535de2e575da7a8b8c")
|
||||
|
@ -16,7 +16,7 @@ class Met(AutotoolsPackage):
|
||||
url = "https://github.com/dtcenter/MET/archive/refs/tags/v11.0.1.tar.gz"
|
||||
git = "https://github.com/dtcenter/MET"
|
||||
|
||||
maintainers("AlexanderRichert-NOAA")
|
||||
maintainers("AlexanderRichert-NOAA", "climbfuji")
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("12.0.1", sha256="ef396a99ca6c2248855848cd194f9ceaf3b051fb5e8c01a0b0b2a00110b1fcfb")
|
||||
@ -67,10 +67,8 @@ class Met(AutotoolsPackage):
|
||||
patch("openmp_shape_patch.patch", when="@10.1.0")
|
||||
|
||||
# https://github.com/JCSDA/spack-stack/issues/615
|
||||
# TODO(srherbener) Apple clang 14.x is getting pickier! When these updates are
|
||||
# merged into the MET code base, the following two patches can be removed.
|
||||
patch("apple-clang-string-cast-operator.patch", when="@10.1.1: %apple-clang@14:")
|
||||
patch("apple-clang-no-register.patch", when="@10.1.1: %apple-clang@14:")
|
||||
patch("apple-clang-string-cast-operator.patch", when="@10.1.1:11.0 %apple-clang@14:")
|
||||
patch("apple-clang-no-register.patch", when="@10.1.1:11.0 %apple-clang@14:")
|
||||
|
||||
def url_for_version(self, version):
|
||||
if version < Version("11"):
|
||||
|
@ -15,7 +15,7 @@ class Metplus(Package):
|
||||
url = "https://github.com/dtcenter/METplus/archive/refs/tags/v4.1.0.tar.gz"
|
||||
git = "https://github.com/dtcenter/METplus"
|
||||
|
||||
maintainers("AlexanderRichert-NOAA")
|
||||
maintainers("AlexanderRichert-NOAA", "climbfuji")
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("6.0.0", sha256="e9358aede2fd2abecd81806227de7b165d68fdf2fc9defcbba24df229461b155")
|
||||
|
@ -0,0 +1,15 @@
|
||||
--- a/setup.py 2022-04-19 20:56:49.000000000 -0600
|
||||
+++ b/setup.py 2022-04-19 20:58:52.000000000 -0600
|
||||
@@ -54,9 +54,9 @@
|
||||
for ext in self.extensions:
|
||||
ext.include_dirs.insert(0, cppy.get_include())
|
||||
ext.extra_compile_args = opts
|
||||
- if sys.platform == 'darwin':
|
||||
- ext.extra_compile_args += ['-stdlib=libc++']
|
||||
- ext.extra_link_args += ['-stdlib=libc++']
|
||||
+ #if sys.platform == 'darwin':
|
||||
+ # ext.extra_compile_args += ['-stdlib=libc++']
|
||||
+ # ext.extra_link_args += ['-stdlib=libc++']
|
||||
if (ct == 'msvc' and os.environ.get('KIWI_DISABLE_FH4')):
|
||||
# Disable FH4 Exception Handling implementation so that we don't
|
||||
# require VCRUNTIME140_1.dll. For more details, see:
|
@ -38,3 +38,7 @@ class PyKiwisolver(PythonPackage):
|
||||
depends_on("py-cppy@1.2.0:", type="build", when="@1.4.4:")
|
||||
depends_on("py-cppy@1.3.0:", type="build", when="@1.4.8:")
|
||||
depends_on("py-typing-extensions", when="@1.4.4: ^python@:3.7", type=("build", "run"))
|
||||
|
||||
# https://github.com/spack/spack/issues/28522
|
||||
# https://github.com/nucleic/kiwi/issues/126
|
||||
patch("macos-gcc.patch", when="@:1.3.2 platform=darwin %gcc")
|
||||
|
@ -19,6 +19,8 @@ class PyPyogrio(PythonPackage):
|
||||
version("0.9.0", sha256="6a6fa2e8cf95b3d4a7c0fac48bce6e5037579e28d3eb33b53349d6e11f15e5a8")
|
||||
|
||||
depends_on("python@3.8:", type=("build", "run"))
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-wheel", type="build")
|
||||
depends_on("gdal@2.4:", type=("build", "link", "run"))
|
||||
depends_on("py-cython@0.29:", type="build")
|
||||
depends_on("py-versioneer@0.28 +toml", type="build")
|
||||
|
@ -16,6 +16,7 @@ class PyRuamelYamlClib(PythonPackage):
|
||||
|
||||
version("0.2.12", sha256="6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f")
|
||||
version("0.2.7", sha256="1f08fd5a2bea9c4180db71678e850b995d2a5f4537be0e94557668cf0f5f9497")
|
||||
version("0.2.4", sha256="f997f13fd94e37e8b7d7dbe759088bb428adc6570da06b64a913d932d891ac8d")
|
||||
with default_args(deprecated=True):
|
||||
version("0.2.0", sha256="b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c")
|
||||
|
||||
|
@ -57,6 +57,7 @@ class Wgrib2(MakefilePackage, CMakePackage):
|
||||
)
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("3.6.0", sha256="55913cb58f2b329759de17f5a84dd97ad1844d7a93956d245ec94f4264d802be")
|
||||
version("3.5.0", sha256="b27b48228442a08bddc3d511d0c6335afca47252ae9f0e41ef6948f804afa3a1")
|
||||
version("3.4.0", sha256="ecbce2209c09bd63f1bca824f58a60aa89db6762603bda7d7d3fa2148b4a0536")
|
||||
version("3.3.0", sha256="010827fba9c31f05807e02375240950927e9e51379e1444388153284f08f58e2")
|
||||
@ -192,7 +193,7 @@ def patch(self):
|
||||
# Use Spack compiler wrapper flags
|
||||
def inject_flags(self, name, flags):
|
||||
if name == "cflags":
|
||||
if self.spec.compiler.name == "apple-clang":
|
||||
if self.spec.compiler.name in ["apple-clang", "clang"]:
|
||||
flags.append("-Wno-error=implicit-function-declaration")
|
||||
|
||||
# When mixing Clang/gfortran need to link to -lgfortran
|
||||
|
Loading…
Reference in New Issue
Block a user