diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2024-10-07 16:43:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-07 16:43:31 +0200 |
commit | c9de1cbcdac67a2a31b45e093237bf35079dec47 (patch) | |
tree | 2456ab909c1736989cd97a2d1daf64e18d49e0b4 | |
parent | eedc41405b594c60c0db0bbc0d255000c001486c (diff) | |
download | spack-c9de1cbcdac67a2a31b45e093237bf35079dec47.tar.gz spack-c9de1cbcdac67a2a31b45e093237bf35079dec47.tar.bz2 spack-c9de1cbcdac67a2a31b45e093237bf35079dec47.tar.xz spack-c9de1cbcdac67a2a31b45e093237bf35079dec47.zip |
py-netcdf4: add v1.7 (#46813)
* py-netcdf4: add v1.7
* [@spackbot] updating style on behalf of adamjstewart
---------
Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
-rw-r--r-- | var/spack/repos/builtin/packages/py-netcdf4/package.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/py-netcdf4/package.py b/var/spack/repos/builtin/packages/py-netcdf4/package.py index 5b2be09a60..d3559439d4 100644 --- a/var/spack/repos/builtin/packages/py-netcdf4/package.py +++ b/var/spack/repos/builtin/packages/py-netcdf4/package.py @@ -10,12 +10,15 @@ class PyNetcdf4(PythonPackage): """Python interface to the netCDF Library.""" homepage = "https://github.com/Unidata/netcdf4-python" - pypi = "netCDF4/netCDF4-1.2.7.tar.gz" + pypi = "netCDF4/netcdf4-1.2.7.tar.gz" maintainers("skosukhin") license("MIT") + version( + "1.7.1.post2", sha256="37d557e36654889d7020192bfb56f9d5f93894cb32997eb837ae586c538fd7b6" + ) version("1.6.5", sha256="824881d0aacfde5bd982d6adedd8574259c85553781e7b83e0ce82b890bfa0ef") version("1.6.2", sha256="0382b02ff6a288419f6ffec85dec40f451f41b8755547154c575ddd9f0f4ae53") version("1.5.8", sha256="ca3d468f4812c0999df86e3f428851fb0c17ac34ce0827115c246b0b690e4e84") @@ -30,6 +33,7 @@ class PyNetcdf4(PythonPackage): depends_on("py-setuptools@61:", when="@1.6.5:", type="build") depends_on("py-setuptools@41.2:", when="@1.6.2:", type="build") depends_on("py-setuptools@18:", when="@1.4.2:1.5.8", type="build") + depends_on("py-setuptools-scm@3.4:+toml", when="@1.7:", type="build") depends_on("py-cftime", type=("build", "run")) depends_on("py-certifi", when="@1.6.5:", type=("build", "run")) depends_on("py-numpy", when="@1.6.5:", type=("build", "link", "run")) @@ -57,6 +61,14 @@ class PyNetcdf4(PythonPackage): when="@1.6: %gcc@14:", ) + def url_for_version(self, version): + url = "https://files.pythonhosted.org/packages/source/n/netCDF4/{}-{}.tar.gz" + if version >= Version("1.7"): + name = "netcdf4" + else: + name = "netCDF4" + return url.format(name, version) + def flag_handler(self, name, flags): if name == "cflags": if self.spec.satisfies("%oneapi") or self.spec.satisfies("%apple-clang@15:"): |