gnu: python-netcdf4: Update to 1.6.2.

* gnu/packages/python-xyz.scm (python-netcdf4): Update to 1.6.2.
  [build-system]: Use pyproject.
  [arguments] <phases>: Remove 'configure-locations; add
  set-configure-flags; use custom 'check.
  [inputs]: Remove hdf4; add zlib.
  [native-inputs]: Remove python-cython; add python-cython-3,
  python-setuptools, and python-wheel.

Change-Id: Ie4e13538c2e5ad8d06055b7c3a4692c26c03e8da
This commit is contained in:
Sharlatan Hellseher 2025-07-19 21:35:13 +01:00
parent 293beaaaa3
commit f9aa810402
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -4236,28 +4236,44 @@ of the netcdf4 package before.")
(define-public python-netcdf4 (define-public python-netcdf4
(package (package
(name "python-netcdf4") (name "python-netcdf4")
(version "1.6.0") (version "1.6.2")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "netCDF4" version)) (uri (pypi-uri "netCDF4" version))
(sha256 (sha256
(base32 (base32
"0qxs8r1qmsmg760wm5q0wqlcm7hdd3k7cghryw6wvqd3v5rs7vwm")))) "0lxfykqdkpbmqma72m2mhwdz8lgl83n5vj7ydygl3252yqpv10h3"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list (list
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'configure-locations (add-before 'build 'set-configure-flags
(lambda _ (lambda _
(setenv "HDF5_DIR" #$(this-package-input "hdf5"))))))) (setenv "CFLAGS" (string-join
(list "-Wno-error=incompatible-pointer-types"
"-Wno-error=implicit-function-declaration"
"-Wno-error=int-conversion")
" "))
(setenv "HDF5_DIR" #$(this-package-input "hdf5"))
(setenv "NETCDF4_DIR" #$(this-package-input "netcdf"))
(setenv "USE_NCCONFIG" "0")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(with-directory-excursion "test"
(setenv "NO_NET" "1")
(setenv "NO_CDL" "1")
(invoke "python" "run_all.py"))))))))
(native-inputs (native-inputs
(list python-cython)) (list python-cython-3
python-setuptools
python-wheel))
(propagated-inputs (propagated-inputs
(list python-numpy python-cftime)) (list python-numpy python-cftime))
(inputs (inputs
(list netcdf hdf4 hdf5)) (list netcdf hdf5 zlib))
(home-page "https://github.com/Unidata/netcdf4-python") (home-page "https://github.com/Unidata/netcdf4-python")
(synopsis "Python/numpy interface to the netCDF library") (synopsis "Python/numpy interface to the netCDF library")
(description "Netcdf4-python is a Python interface to the netCDF C (description "Netcdf4-python is a Python interface to the netCDF C