summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-05-08 08:36:50 +0200
committerRicardo Wurmus <rekado@elephly.net>2024-05-08 09:21:00 +0200
commit6b17820f1b4718cfc10be5c5178c12579875d8c0 (patch)
treea7e16cb2f9d400c93849cfafc5bfd2e74398e22b
parente2a0660c37f96003ae3c3625fe5217a4d4328921 (diff)
gnu: python-cattrs: Update to 23.2.3.
* gnu/packages/python-xyz.scm (python-cattrs): Update to 23.2.3. [arguments]: Remove 'adjust-for-older-attrs and custom 'check phases; add 'patch-pyproject phase. [native-inputs]: Add python-hatchling, python-hatch-vcs, and python-pytest-benchmark. [propagated-inputs]: Add python-cbor2, python-orjson, python-pyyaml, python-tomlkit, and python-ujson. Change-Id: I4bf66d9b767be3c62a816e68e6c3cecd3152cb32
-rw-r--r--gnu/packages/python-xyz.scm41
1 files changed, 19 insertions, 22 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e93bac9fd6..b25b536fe8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21501,7 +21501,7 @@ strings require only one extra byte in addition to the strings themselves.")
(define-public python-cattrs
(package
(name "python-cattrs")
- (version "22.1.0")
+ (version "23.2.3")
(source (origin
(method git-fetch) ;for tests
(uri (git-reference
@@ -21510,43 +21510,40 @@ strings require only one extra byte in addition to the strings themselves.")
(file-name (git-file-name name version))
(sha256
(base32
- "1n0h25gj6zd02kqyl040xpdvg4hpy1j92716sz0rg019xjqqijqb"))))
+ "0lrrz4n6ygfyrzn40mxm82kkvgqclfi760zydy4lin3bcv73jqyd"))))
(build-system pyproject-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'adjust-for-older-attrs
- ;; Our older attrs package is using the 'attr' rather than 'attrs'
- ;; namespace.
- ;; TODO: Remove after python-attrs is updated to >= 21.4.0.
+ (add-after 'unpack 'patch-pyproject
(lambda _
- (substitute* (find-files "." "\\.py$")
- (("from attrs\\b")
- "from attr"))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- ;; Do not use the 'pytest' binary as it hard-codes an older
- ;; python-hypothesis version near the beginning of its
- ;; GUIX_PYTHONPATH.
- (invoke "python" "-m" "pytest" "-vv" "-c" "/dev/null" "tests"
- "-n" (number->string (parallel-job-count))
- ;; This test requires orjson, which needs the maturin
- ;; build system and new Rust dependencies.
- "--ignore" "tests/test_preconf.py")))))))
+ (substitute* "pyproject.toml"
+ ;; Fix version string
+ (("dynamic = \\[\"version\"\\]")
+ (string-append "version = \"" #$version "\""))
+ ;; Just run pytest with no frills
+ (("addopts = \"-l.*") "")))))))
(native-inputs
- (list python-hypothesis
+ (list python-hatchling
+ python-hatch-vcs
+ python-hypothesis
python-immutables
python-msgpack
python-poetry-core
python-pymongo ;for the bson module
python-pytest
+ python-pytest-benchmark
python-pytest-xdist))
(propagated-inputs
(list python-attrs
+ python-cbor2
python-exceptiongroup
- python-typing-extensions))
+ python-orjson
+ python-pyyaml
+ python-tomlkit
+ python-typing-extensions
+ python-ujson))
(home-page "https://github.com/python-attrs/cattrs")
(synopsis "Python library for structuring and unstructuring data")
(description "@code{cattrs} is an Python library for structuring and