From c704e6129752aeb16e71bb7f471a6cfcd4a17a8c Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Thu, 25 Dec 2025 13:11:06 +0100 Subject: gnu: python-jellyfish: Update to 1.2.1. * gnu/packages/rust-crates.scm: Import crates. * gnu/packages/python-xyz.scm (python-jellyfish): Update to 1.2.1. [build-system]: Switch to pyproject-build-system (maturin). [arguments]: Rewrite them all to accomodate maturin. [native-inputs]: Add python-pytest, python-setuptools, rust, rust:cargo. [inputs]: Add maturin and jellyfish cargo inputs. [home-page]: Update it. Change-Id: I07e0b6ae05e80027c28de024777bba393e919c2b Signed-off-by: Sharlatan Hellseher Signed-off-by: Rutherther --- gnu/packages/python-xyz.scm | 59 +++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 18 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 4494d53595d..7406a0a9850 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -20982,26 +20982,49 @@ doesn't know about.") (define-public python-jellyfish (package (name "python-jellyfish") - (version "0.8.8") - (source (origin - (method url-fetch) - (uri (pypi-uri "jellyfish" version)) - (sha256 - (base32 - "0p2s6b30sfffx8sya2i8kz0i0riw9fq1fi0k89s8kdgrmjf0h1h5")))) - (build-system python-build-system) + (version "1.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jamesturk/jellyfish") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zsbvyq608yrfv29hlwjkr6ycrghy8s5hpwnj3aa9symihazpb4c")))) + (build-system pyproject-build-system) (arguments - `(#:tests? #f ; XXX: Tests cannot find C coded version. - #:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv" "jellyfish/test.py"))))))) + (list + #:imported-modules (append %cargo-build-system-modules + %pyproject-build-system-modules) + #:modules '(((guix build cargo-build-system) #:prefix cargo:) + (guix build pyproject-build-system) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'prepare-cargo-build-system + (lambda args + (for-each + (lambda (phase) + (format #t "Running cargo phase: ~a~%" phase) + (apply (assoc-ref cargo:%standard-phases phase) + #:cargo-target #$(cargo-triplet) + args)) + '(unpack-rust-crates + configure + check-for-pregenerated-files + patch-cargo-checksums))))))) + (inputs (cons* maturin (cargo-inputs 'jellyfish))) (native-inputs - (list python-pytest)) - (home-page "https://github.com/jamesturk/jellyfish") + (append + (list python-pytest + python-setuptools + rust + `(,rust "cargo")) + (or (and=> (%current-target-system) + (compose list make-rust-sysroot)) + '()))) + (home-page "https://www.jpt.sh/projects/jellyfish/") (synopsis "Approximate and phonetic matching of strings") (description "Jellyfish uses a variety of string comparison and phonetic encoding algorithms to do fuzzy string matching.") -- cgit v1.3