gnu: python-ujson: Update to 5.10.0.

* gnu/packages/python-xyz.scm (python-ujson): Update to 5.10.0.
[build-system]: Switch to pyproject.
[native-inputs]: Add python-pytest, python-setuptools, python-wheel.

Change-Id: I73a0352677cfb4d1cd2c48560955415ce57fafbf
Signed-off-by: Steve George <steve@futurile.net>
This commit is contained in:
Nicolas Graves 2025-04-06 14:37:20 +02:00 committed by Andreas Enge
parent 8d6d1dc611
commit 13a2c019c2
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -32497,38 +32497,38 @@ register custom encoders and decoders.")
(define-public python-ujson (define-public python-ujson
(package (package
(name "python-ujson") (name "python-ujson")
(version "5.7.0") (version "5.10.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "ujson" version)) (uri (pypi-uri "ujson" version))
(sha256 (sha256
(base32 (base32
"08vvyfyg4qvjy2vxrvc0qix5zmd0j6wd0icvmhc633xfvkayb277")) "1habmn3bmmv2ym4ldiijcavdkdzp8h28h60hgwjkhxwcbly8zkdk"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin (delete-file-recursively "deps") #t)))) #~(begin (delete-file-recursively "deps")))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(add-after 'unpack 'link-to-system-double-conversion #~(modify-phases %standard-phases
(lambda* (#:key inputs #:allow-other-keys) (add-after 'unpack 'link-to-system-double-conversion
(let ((d-c (assoc-ref inputs "double-conversion"))) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "setup.py" (let ((d-c (assoc-ref inputs "double-conversion")))
(("./deps/double-conversion/double-conversion\"") (substitute* "setup.py"
(string-append d-c "/include/double-conversion\"")) (("./deps/double-conversion/double-conversion\"")
(("-lstdc++" stdc) (string-append d-c "/include/double-conversion\""))
(string-append "-L" d-c "/lib\"," (("-lstdc++" stdc)
" \"-ldouble-conversion\"," (string-append "-L" d-c "/lib\","
" \"" stdc))) " \"-ldouble-conversion\","
#t))) " \"" stdc)))))))))
(replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(invoke "pytest"))))))
(native-inputs (native-inputs
(list double-conversion python-setuptools-scm python-pytest)) (list double-conversion
python-pytest
python-setuptools
python-setuptools-scm
python-wheel))
(home-page "https://github.com/ultrajson/ultrajson") (home-page "https://github.com/ultrajson/ultrajson")
(synopsis "Ultra fast JSON encoder and decoder for Python") (synopsis "Ultra fast JSON encoder and decoder for Python")
(description (description