[bug#76746,v2,05/13] gnu: Add python-dacite.

Message ID d5cd44e82b20a83038e0c5e59565842b0763d14f.1741702572.git.45mg.writes@gmail.com
State New
Headers
Series None |

Commit Message

45mg March 11, 2025, 2:23 p.m. UTC
  * gnu/packages/python-xyz.scm (python-dacite): New variable.

Change-Id: Id70254ff672871c2ecdd59c648b9107f92c1454d
---
 gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
  

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index db105cd427..f74b020f6d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -33980,6 +33980,38 @@  (define-public python-dictpath
 accessor layer.")
     (license license:asl2.0)))
 
+(define-public python-dacite
+  (package
+    (name "python-dacite")
+    (version "1.9.2")
+    (source
+     (origin
+       (method git-fetch)  ;tests not properly included in PyPI
+       (uri (git-reference
+             (url "https://github.com/konradhalas/dacite")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1maananph172vi3v919zryhn9hswhcjb8w3srknkd4b9y1dfl0wq"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; Disable benchmarks.
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-pyproject-remove-benchmarks
+                    (lambda _
+                      (substitute* "pyproject.toml"
+                        (("--benchmark-autosave --benchmark-json=benchmark.json")
+                         "")))))
+       #:test-flags '("--ignore=tests/performance")))
+    (native-inputs (list python-pytest python-pytest-benchmark
+                         python-setuptools python-wheel))
+    (home-page "https://github.com/konradhalas/dacite")
+    (synopsis "Python 3 module to simplify creation of data classes from
+dictionaries")
+    (description "This Python 3 module simplifies creation of data
+classes (PEP 557) from dictionaries.")
+    (license license:expat)))
+
 (define-public pyzo
   (package
     (name "pyzo")