gnu: Add python-databind-json.

* gnu/packages/python-xyz.scm (python-databind-json): New variable.

Change-Id: Iaab64e28ba6772c14704ff67cffab21a2f555460
This commit is contained in:
Ricardo Wurmus 2024-01-15 22:49:51 +01:00
parent 97692be948
commit 12ae026e51
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -581,6 +581,47 @@ (define-public python-databind-core
Python dataclasses.")
(license license:expat)))
(define-public python-databind-json
(package
(name "python-databind-json")
(version "4.4.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "databind.json" version))
(sha256
(base32 "1lm864d7arfq0pw64hyc83bwn1z94wjg7a22q1xf0qkjynqs70gg"))))
(build-system pyproject-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'fix-name
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((sitedir (site-packages inputs outputs))
(dist-info
(string-append sitedir "/databind_json-" #$version ".dist-info")))
(substitute* (string-append dist-info "/METADATA")
(("Name: databind-json")
"Name: databind.json"))
(substitute* (string-append dist-info "/RECORD")
(("databind_json") "databind.json"))
(rename-file dist-info
(string-append sitedir
"/databind.json-"
#$version ".dist-info"))))))))
(propagated-inputs
(list python-databind-core python-nr-date
python-typeapi python-typing-extensions))
(native-inputs (list python-poetry-core python-pytest))
(home-page "https://niklasrosenstein.github.io/python-databind/json/")
(synopsis
"De-/serialize Python dataclasses to or from JSON payloads")
(description
"The @code{databind.json} package implements the de-/serialization to or
from JSON payloads using the @code{databind.core} framework.")
(license license:expat)))
(define-public python-fire
(package
(name "python-fire")