gnu: python-pywavelets: Update to 1.8.0.

* gnu/packages/python-xyz.scm (python-pywavelets): Update to 1.8.0.
[source]: Remove obsolete snippet.
[build-system]: Use pyproject-build-system.
[arguments]: Remove custom 'check phase; add 'pre-check phase.
[native-inputs]: Replace python-cython with python-cython-3; remove
python-matplotlib; add meson, ninja, pkg-config, python-meson-python, and
python-numpy.
[propagated-inputs]: Add python-scipy.

Change-Id: I1d157775a2079e2a218dea89ab46bbd01685d91a
This commit is contained in:
Ricardo Wurmus 2025-02-10 21:00:38 +01:00 committed by Andreas Enge
parent 50cd73c12e
commit 6abfc4a723
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -12540,46 +12540,36 @@ formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
(define-public python-pywavelets (define-public python-pywavelets
(package (package
(name "python-pywavelets") (name "python-pywavelets")
(version "1.2.0") (version "1.8.0")
(home-page "https://github.com/PyWavelets/pywt") (home-page "https://github.com/PyWavelets/pywt")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "PyWavelets" version)) (uri (pypi-uri "pywavelets" version))
(sha256 (sha256
(base32 (base32
"13csbr6ls9q9ww53z2xwwsj0hpsz88rj2iwp623h0kmv8yq6kgbc")) "1aimbjxvflmx4qrl17bfzy64pz5ql4s9bhnb8g0ssh28fm2h507k"))))
(snippet (build-system pyproject-build-system)
#~(begin
(use-modules ((guix build utils)))
(for-each delete-file
(list
"pywt/_extensions/_cwt.c"
"pywt/_extensions/_dwt.c"
"pywt/_extensions/_pywt.c"
"pywt/_extensions/_pywt.h"
"pywt/_extensions/_swt.c"))))))
(build-system python-build-system)
(arguments (arguments
'(#:modules ((ice-9 ftw) (list
(srfi srfi-1) #:test-flags '(list "--pyargs" "pywt")
(srfi srfi-26) #:phases
(guix build utils) #~(modify-phases %standard-phases
(guix build python-build-system)) ;; The compiled libraries are only in the output at this point,
#:phases ;; but they are needed to run tests.
(modify-phases %standard-phases ;; FIXME: This should be handled by the pyargs pytest argument,
(replace 'check ;; but is not for some reason.
(lambda _ (add-before 'check 'pre-check
(let ((cwd (getcwd)) (lambda _ (chdir #$output))))))
(libdir (find (cut string-prefix? "lib." <>)
(scandir "build"))))
(with-directory-excursion (string-append cwd "/build/" libdir)
(invoke "pytest" "-vv"))))))))
(native-inputs (native-inputs
(list python-cython (list meson
python-matplotlib ;for tests ninja
pkg-config
python-cython-3
python-meson-python
python-numpy
python-pytest)) python-pytest))
(propagated-inputs (propagated-inputs
(list python-numpy)) (list python-numpy python-scipy))
(synopsis "Wavelet transforms in Python") (synopsis "Wavelet transforms in Python")
(description (description
"PyWavelets is a library for wavelet transforms in Python. Wavelets are "PyWavelets is a library for wavelet transforms in Python. Wavelets are