summaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2026-06-18 01:15:20 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2026-08-11 12:51:24 +0100
commit42f32a234a14912614820091e13e50178417f878 (patch)
tree2bbfc58f1236adbe758ae11c24dbaabc67db144f /gnu/packages/python-web.scm
parentfe7b724c33427520df5d408e7d21d88d9352c750 (diff)
gnu: Add python-hf-xet.
* gnu/packages/python-web.scm (python-hf-xet): New variable. Relates-to: guix/guix!10416 Reviewed-by: Hugo Buddelmeijer <hugo@buddelmeijer.nl> Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm61
1 files changed, 61 insertions, 0 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index be64baba7a6..478088c502f 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2015,6 +2015,67 @@ libraries.")
2015not require C extensions or system dependencies.") 2015not require C extensions or system dependencies.")
2016 (license license:expat))) 2016 (license license:expat)))
2017 2017
2018(define-public python-hf-xet
2019 (package
2020 (name "python-hf-xet")
2021 (version "1.5.1")
2022 (source
2023 (origin
2024 (method git-fetch)
2025 (uri (git-reference
2026 (url "https://github.com/huggingface/xet-core")
2027 (commit (string-append "v" version))))
2028 (file-name (git-file-name name version))
2029 (sha256
2030 (base32 "0bczy0a8g7fnscpz2plq2pq0b8vapx9q5sny13rs2fa04ypq992f"))
2031 (modules '((guix build utils)))
2032 (snippet #~(for-each delete-file
2033 (find-files "." "Cargo\\.lock$")))))
2034 (build-system pyproject-build-system)
2035 (arguments
2036 (list
2037 #:imported-modules (append %cargo-build-system-modules
2038 %pyproject-build-system-modules)
2039 #:modules '(((guix build cargo-build-system) #:prefix cargo:)
2040 (guix build pyproject-build-system)
2041 (guix build utils))
2042 #:phases
2043 #~(modify-phases %standard-phases
2044 (add-after 'unpack 'prepare-cargo-build-system
2045 (lambda args
2046 (for-each (lambda (phase)
2047 (format #t "Running cargo phase: ~a~%" phase)
2048 (apply (assoc-ref cargo:%standard-phases phase)
2049 #:cargo-target #$(cargo-triplet)
2050 args))
2051 '(prepare-rust-crates
2052 unpack-rust-crates
2053 configure
2054 check-for-pregenerated-files
2055 patch-cargo-checksums))))
2056 (add-after 'prepare-cargo-build-system 'chdir
2057 (lambda _
2058 (chdir "hf_xet"))))))
2059 (native-inputs
2060 (append (list maturin
2061 python-pytest
2062 rust
2063 `(,rust "cargo"))
2064 (or (and=> (%current-target-system)
2065 (compose list make-rust-sysroot))
2066 '())))
2067 (inputs (cargo-inputs 'hf_xet))
2068 (home-page "https://github.com/huggingface/xet-core")
2069 (synopsis "Transfer large files with the Hugging Face Hub")
2070 (description
2071 "This package enables @code{python-huggingface-hub} to utilize xet
2072storage for uploading and downloading to HF Hub. Xet storage provides
2073chunk-based deduplication, efficient storage/retrieval with local disk
2074caching, and backwards compatibility with Git LFS. This library is not meant
2075to be used directly, and is instead intended to be used from
2076@code{python-huggingface-hub}.")
2077 (license license:asl2.0)))
2078
2018(define-public python-huggingface-hub 2079(define-public python-huggingface-hub
2019 (package 2080 (package
2020 (name "python-huggingface-hub") 2081 (name "python-huggingface-hub")