1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: python-msgspec: Update to 0.20.0.

* gnu/packages/serialization.scm (python-msgspec): Update to 0.20.0.
  [source]<snippet>: Adjust the path to atof_consts.h.
  [arguments]<#:test-flags>: Adjust to disable all typing tests.
  [native-inputs]: Remove python-gcovr, python-versioneer, and python-wheel.
  [supported-systems]: Remove restrictions as no longer specified
  by upstream.

Change-Id: Iab29b85cfd5c598db82f8753475d15ad97a564db
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nguyễn Gia Phong
2026-02-23 12:27:56 +09:00
committed by Sharlatan Hellseher
parent b934290d1e
commit d590b5d285

View File

@@ -705,7 +705,7 @@ RPC system. Think JSON, except binary. Or think Protocol Buffers, except faste
(define-public python-msgspec
(package
(name "python-msgspec")
(version "0.18.6")
(version "0.20.0")
(source (origin
;; There are no tests in the PyPI tarball.
(method git-fetch)
@@ -716,39 +716,32 @@ RPC system. Think JSON, except binary. Or think Protocol Buffers, except faste
(modules '((guix build utils)))
(snippet
;; Delete autogenerated file, regenerate in a phase.
'(begin
(delete-file "msgspec/atof_consts.h")))
#~(begin
(delete-file "src/msgspec/atof_consts.h")
;; https://github.com/jcrist/msgspec/pull/981
(substitute* "scripts/generate_atof_consts.py"
(("os.path.join\\(repo, " all)
(string-append all "\"src\", ")))))
(sha256
(base32
"0akq8lc3547i0j67dpnq1si3dvdc51r4f66dka2h7mq6c4zxq3fn"))))
"1nbaqdyn71zcqj3wj33xw90spm9s93c7qmfkjwbnmmx85ffycq0d"))))
(build-system pyproject-build-system)
(arguments
(list
;; Disable only one failing test.
;;
;; AssertionError: msgspec/structs.pyi:7: error: Positional-only
;; parameters are only supported in Python 3.8 and greater
#:test-flags #~(list "-k" "not test_mypy")
;; .pytest.toml declares testpaths = ["tests/unit", "tests/typing"]
;; so --ignore=tests/typing will not work.
#:test-flags #~(list "tests/unit")
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'versioneer
(lambda _
(invoke "versioneer" "install")
(substitute* "setup.py"
(("version=versioneer.get_version\\(),")
(format #f "version=~s," #$version)))))
(add-after 'versioneer 'atof-consts
(add-after 'unpack 'atof-consts
(lambda _
(with-directory-excursion "scripts"
;; Regenerate the autogenerated file.
(invoke "python" "generate_atof_consts.py")))))))
(native-inputs (list python-attrs
python-gcovr
python-msgpack
python-pytest
python-setuptools-scm
python-versioneer
python-setuptools
python-wheel))
python-setuptools-scm))
(propagated-inputs (list python-pyyaml python-tomli python-tomli-w))
(home-page "https://jcristharif.com/msgspec/")
(synopsis "Fast serialization/validation library")
@@ -762,10 +755,6 @@ includes the following features:
@item Zero-cost schema validation using familiar Python type annotations.
@item A speedy Struct type for representing structured data.
@end itemize")
;; XXX: It might support more architectures but GitHub Actions listed only
;; two right now. Try to build for the rest supported by Guix. See:
;; https://github.com/jcrist/msgspec/blob/main/.github/workflows/ci.yml#L83
(supported-systems (list "x86_64-linux" "aarch64-linux"))
(license license:bsd-3)))
(define-public python-ruamel.yaml