diff mbox series

[bug#69048,30/32] gnu: Add python-pydantic-2.

Message ID 1f6549e0828e4a4638a98e948b9b395ae5e8e457.1707650794.git.h.goebel@crazy-compilers.com
State New
Headers show
Series Add python-pydantic v2 and required rust and python packages | expand

Commit Message

Hartmut Goebel Feb. 11, 2024, 11:43 a.m. UTC
* gnu/packages/python-xyz.scm (python-pydantic-2): New variable.
---
 gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4749c3f204..47aaa84e76 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7424,6 +7424,39 @@  (define-public python-pydantic-core
 validation and serialization.")
     (license license:expat)))
 
+(define-public python-pydantic-2
+  (package
+    (inherit python-pydantic)
+    (name "python-pydantic")
+    (version "2.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pydantic" version))
+       (sha256
+        (base32 "1a8zbm510czjnfa6xn56w80q121pk7qpywrjdlzcd3a8la1c3mag"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; This test requires pytest-examples, which in turn requires
+     ;; python-ruff, which is difficult to package because it is
+     ;; written in Rust (TODO: Enable when Ruff is in Guix!).
+     (list #:test-flags #~'("--ignore" "tests/test_docs.py")))
+    (native-inputs
+     (list python-hatchling
+           python-hatch-fancy-pypi-readme
+           python-cloudpickle
+           python-dirty-equals
+           python-email-validator
+           python-faker
+           python-pytest
+           python-pytest-benchmark
+           python-pytest-mock))
+    (propagated-inputs
+     (list python-annotated-types
+           python-pydantic-core
+           python-typing-extensions))
+    (license license:expat)))
+
 (define-public python-pydantic-cli
   (package
     (name "python-pydantic-cli")