diff options
| author | Ghislain Vaillant <ghislain.vaillant@inria.fr> | 2025-12-26 09:19:08 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-12-28 23:23:53 +0000 |
| commit | d6e85a9baf784e6929ad3606a96408a72eb0ccfc (patch) | |
| tree | 25afe62d7516807e9a2fe1c1f00c0368790b5803 | |
| parent | cf8d746dfe009d761846267ca66002a3df8f401d (diff) | |
gnu: Add python-backports-zstd.
* gnu/packages/python-compression.scm (python-backports-zstd): New variable.
Change-Id: Ida22c9d39e5f2191bf97532cce537a0a9d8f9682
Modified-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
| -rw-r--r-- | gnu/packages/python-compression.scm | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/python-compression.scm b/gnu/packages/python-compression.scm index b996cc5fa9f..d0e5571dfe4 100644 --- a/gnu/packages/python-compression.scm +++ b/gnu/packages/python-compression.scm | |||
| @@ -58,6 +58,58 @@ | |||
| 58 | #:use-module (gnu packages rust-apps) | 58 | #:use-module (gnu packages rust-apps) |
| 59 | #:use-module (gnu packages sphinx)) | 59 | #:use-module (gnu packages sphinx)) |
| 60 | 60 | ||
| 61 | (define-public python-backports-zstd | ||
| 62 | (package | ||
| 63 | (name "python-backports-zstd") | ||
| 64 | (version "1.2.0") | ||
| 65 | (source | ||
| 66 | (origin | ||
| 67 | (method git-fetch) | ||
| 68 | (uri (git-reference | ||
| 69 | (url "https://github.com/rogdham/backports.zstd") | ||
| 70 | (commit (string-append "v" version)))) | ||
| 71 | (file-name (git-file-name name version)) | ||
| 72 | (sha256 | ||
| 73 | (base32 "08dlr3zfk6fsn9g99msy2ap43c740hmc1l1c4xccigkrkjn9p0sp")))) | ||
| 74 | (build-system pyproject-build-system) | ||
| 75 | (arguments | ||
| 76 | (list | ||
| 77 | ;; tests: 1249 passed | ||
| 78 | #:test-backend #~'unittest | ||
| 79 | #:test-flags #~(list "discover" "tests") | ||
| 80 | #:phases | ||
| 81 | #~(modify-phases %standard-phases | ||
| 82 | (add-after 'unpack 'use-system-zstd | ||
| 83 | (lambda _ | ||
| 84 | (substitute* "setup.py" | ||
| 85 | (("_SYSTEM_ZSTD = False") | ||
| 86 | "_SYSTEM_ZSTD = True")))) | ||
| 87 | (add-after 'unpack 'skip-copy-of-zstd-license | ||
| 88 | (lambda _ | ||
| 89 | (substitute* "setup.py" | ||
| 90 | (("f.write.*read_text.*") | ||
| 91 | "")))) | ||
| 92 | (add-after 'unpack 'skip-tests-requiring-root | ||
| 93 | (lambda _ | ||
| 94 | (substitute* "tests/test/test_tarfile.py" | ||
| 95 | (("import pwd, grp") | ||
| 96 | "return False")))) | ||
| 97 | (add-before 'check 'pre-check | ||
| 98 | (lambda _ | ||
| 99 | ;; Skip tests that may fail when using the system library. | ||
| 100 | (setenv "BACKPORTSZSTD_SKIP_EXTENSION_TEST" "1")))))) | ||
| 101 | (native-inputs | ||
| 102 | (list pythoncapi-compat | ||
| 103 | python-setuptools)) | ||
| 104 | (inputs | ||
| 105 | (list (list zstd "lib"))) | ||
| 106 | (home-page "https://peps.python.org/pep-0784/") | ||
| 107 | (synopsis "Backport of compression.zstd for Python") | ||
| 108 | (description | ||
| 109 | "This package provides a backport of the compression.zstd module for | ||
| 110 | Python versions below 3.14.") | ||
| 111 | (license license:psfl))) | ||
| 112 | |||
| 61 | (define-public python-blosc | 113 | (define-public python-blosc |
| 62 | (package | 114 | (package |
| 63 | (name "python-blosc") | 115 | (name "python-blosc") |
