diff options
-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:"): |