summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2025-12-07 12:48:30 +0000
committerRutherther <rutherther@ditigal.xyz>2026-01-25 21:18:26 +0100
commita6d97ad9890b1e4a6f4953e9b85ef1beec3ce59a (patch)
tree3297b53aa71e5c5a2cc8bdda57a205fffbaa945e /gnu
parent0f86974f08c64e48be7e3e0ee6a1f269703ea676 (diff)
gnu: Add python-pydantic-extra-types.
* gnu/packages/python-xyz.scm (python-pydantic-extra-types): New variable. Change-Id: I6603d0f0a5cbef6b4b9aede144623604ad5fbf37 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-xyz.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6f5473345d7..0c97e9f45cc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10303,6 +10303,61 @@ validation and serialization.")
Interfaces} via data models provided in the JSON format.")
(license license:expat)))
+(define-public python-pydantic-extra-types
+ (package
+ (name "python-pydantic-extra-types")
+ (version "2.10.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pydantic/pydantic-extra-types")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0n3w6zm7wdj0xb2c4kjkysfxhcr5pzbgcpcw158pzdsxz6svnrl3"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ ;; tests: 13079 passed, 1 deselected
+ #:test-flags
+ ;; See: <https://github.com/pydantic/pydantic-extra-types/issues/345>.
+ #~(list "--ignore=tests/test_s3.py"
+ "--deselect=tests/test_coordinate.py::test_json_schema"
+ ;; XXX: The most of the tests fail, pendulum is optional package
+ ;; and needs to be =>3 where we have 2.1.2, updating to 3+
+ ;; requires Rust.
+ "--ignore=tests/test_pendulum_dt.py"
+ "--ignore=tests/test_json_schema.py")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "TZ" "UTC")
+ (setenv "TZDIR" (search-input-directory inputs
+ "share/zoneinfo")))))))
+ (native-inputs
+ (list python-pytest
+ python-hatchling
+ tzdata-for-tests))
+ (propagated-inputs
+ (list python-pydantic
+ python-typing-extensions
+ ;; [optional]
+ python-cron-converter
+ ;; python-pendulum
+ python-phonenumbers
+ python-pycountry
+ python-pymongo
+ python-pytz
+ python-semver
+ python-tzdata
+ python-ulid))
+ (home-page "https://github.com/pydantic/pydantic-extra-types")
+ (synopsis "Extra Pydantic types")
+ (description "This package provides sxtra types for Pydantic.")
+ (license license:expat)))
+
(define-public python-pydantic-settings
(package
(name "python-pydantic-settings")