diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2026-03-11 14:29:25 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-03-12 19:18:15 +0000 |
| commit | 16a8b177f130dc5532cb316766d5730db28ad2cd (patch) | |
| tree | f47751ada0f9ecfd3c282eff3cc72f9efb77f1a7 /gnu/packages/python-xyz.scm | |
| parent | f3e14dfa74f01ea6f3adf2275269b4429ded73dd (diff) | |
gnu: python-fastbencode: Update to 0.3.9.
* gnu/packages/python-xyz.scm (python-fastbencode): Update to 0.3.9.
[source]: Switch to git-fetch.
[arguments]<#:test-flags>: Refresh them.
<#:imported-modules, #:modules>: Use necessary modules.
<#:phases>: Add phase 'prepare-cargo-build-system.
[inputs]: Add maturin and bencode cargo-inputs.
[native-inputs]: Replace python-setuptools by python-setuptools-rust.
Add rust, rust:cargo, make-rust-sysroot.
* gnu/packages/rust-crates.scm: Record required crates.
Merges: https://codeberg.org/guix/guix/pulls/7057
Change-Id: Iedd3b3f90a4845b03ba18ffaad007ec3be16048b
Reviewed-by: Hugo Buddelmeijer <hugo@buddelmeijer.nl>
Reviewed-by: Efraim Flashner <efraim@flashner.co.il>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 2d148021002..239c25b59ea 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -17921,24 +17921,49 @@ JSON Reference and JSON Pointer.") (define-public python-fastbencode (package (name "python-fastbencode") - (version "0.3.2") ;the last non Rust version + (version "0.3.9") (source (origin - (method url-fetch) - (uri (pypi-uri "fastbencode" version)) - (modules '((guix build utils))) - ;; Delete pre-generated Cython C files. - (snippet '(for-each delete-file (find-files "." "\\.c$"))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/breezy-team/fastbencode") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "1daal7xgsl2sjxq8pcilcas9wd9j9796wd4rlkhrvv5h0k2k4k53")))) + (base32 "0d4sd1c2yv85spxx2gvi2fm0avlgpnb7nfkvw7hpxlx6qlaqi4ad")))) (build-system pyproject-build-system) (arguments (list #:test-backend #~'unittest - #:test-flags #~(list "fastbencode.tests.test_suite"))) + #:test-flags #~(list "tests.test_suite") + #: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 (cargo-inputs 'fastbencode)) (native-inputs - (list python-cython - python-setuptools)) + (append + (list python-setuptools-rust + rust + `(,rust "cargo")) + (or (and=> (%current-target-system) + (compose list make-rust-sysroot)) + '()))) (home-page "https://github.com/breezy-team/fastbencode") (synopsis "Python Bencode (de)serializer with optional fast C extensions") (description |
