diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-12-05 15:26:22 +0000 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2026-01-25 21:18:11 +0100 |
| commit | 01e1779319befb75bb50d6b4d6990d36eaa6c18f (patch) | |
| tree | c51b17f4a481801157df3ea484e5f6848ca2ccd1 /gnu/packages/python-xyz.scm | |
| parent | b715e332d966aa8c83e3406fb90838395d0ae428 (diff) | |
gnu: python-pydantic-core: Update to 2.41.5.
* gnu/packages/python-xyz.scm (python-pydantic-core): Update to
2.41.5. Enable tests.
[build-system]: Switch to pyproject-build-system.
[arguments] <modules>: Adjust for pyproject-build-system.
<phases>: Add 'prepare-cargo-build-system, and 'patch-pyproject.toml.
[native-inputs]: Add python-dirty-equals, python-pytest,
python-pytest-benchmark, python-pytest-mock, python-pytest-timeout,
python-typing-inspetion, python-tzdata, rust, and `(,rust "cargo")).
* gnu/packages/rust-crates.scm: (rust-cc-1.0.101, rust-jiter-0.11.1,
rust-lexical-parse-float-1.0.5, rust-lexical-parse-integer-1.0.5,
rust-lexical-util-1.0.6, rust-libc-0.2.155, rust-portable-atomic-1.6.0,
rust-proc-macro2-1.0.86, rust-pyo3-0.26.0,
rust-pyo3-build-config-0.26.0, rust-pyo3-ffi-0.26.0,
rust-pyo3-macros-0.26.0, rust-pyo3-macros-backend-0.26.0,
rust-quote-1.0.36, rust-rustversion-1.0.17, rust-speedate-0.17.0,
rust-syn-2.0.82): New variables.
* gnu/packages/rust-crates.scm (lookup-cargo-inputs):
{python-pydantic-core}: Refresh the list.
Change-Id: Id861b1bdebad583c9d34a708ee229c61d7c2a799
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 62 |
1 files changed, 49 insertions, 13 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index c34ccf6c7d0..3d66d302abb 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -10135,34 +10135,70 @@ errors when data is invalid.") (define-public python-pydantic-core (package (name "python-pydantic-core") - (version "2.27.2") + (version "2.41.5") (source (origin (method url-fetch) (uri (pypi-uri "pydantic_core" version)) (sha256 - (base32 "0fgv3xdn4n7a606sjz8b15cnzyqy3pspycvjc1r0bvhz9id6w0pb")))) - (build-system cargo-build-system) + (base32 "0vj72r481py6r5mlna185g3ppw1jri964q77spzp7lval4gabnh8")))) + (build-system pyproject-build-system) (arguments (list #:imported-modules `(,@%cargo-build-system-modules ,@%pyproject-build-system-modules) - #:modules '((guix build cargo-build-system) - ((guix build pyproject-build-system) #:prefix py:) + #:modules '(((guix build cargo-build-system) #:prefix cargo:) + (guix build pyproject-build-system) (guix build utils)) + ;; tests: 5318 passed, 123 skipped, 10 xfailed + #:test-flags + #~(list "--ignore=tests/benchmarks" + ;; XXX: It cycles, bootstrap variant needs to be introduced: + ;; python-pydantic-core -> python-pydantic -> + ;; python-inline-snapshot -> python-pydantic-core + "--ignore=tests/test_docstrings.py" + "--ignore=tests/test_hypothesis.py" + "--ignore=tests/validators/test_allow_partial.py" + "--ignore=tests/validators/test_frozenset.py" + "--ignore=tests/validators/test_list.py" + "--ignore=tests/validators/test_set.py") #:phases - (with-extensions (list (pyproject-guile-json)) #~(modify-phases %standard-phases - (add-after 'build 'build-python-module - (assoc-ref py:%standard-phases 'build)) - (add-after 'build-python-module 'install-python-module - (assoc-ref py:%standard-phases 'install)))) - #:install-source? #false)) + (add-after 'unpack 'prepare-cargo-build-system + (lambda args + (for-each (lambda (phase) + (format #t "Running cargo phase: ~a~%" phase) + (apply (assoc-ref cargo:%standard-phases phase) + #:cargo-target #$(cargo-triplet) + args)) + '(unpack-rust-crates + configure + check-for-pregenerated-files + patch-cargo-checksums)))) + (add-after 'unpack 'patch-pyproject + (lambda _ + ;; maturin failed to parce pyproject.toml. + (substitute* "pyproject.toml" + (("^license-files = .*") ""))))))) (native-inputs - (list maturin python-typing-extensions python-wrapper)) + (append + (list maturin + python-dirty-equals + python-pytest + python-pytest-benchmark ;TODO: disable in pyproject.toml + python-pytest-mock + python-pytest-timeout + python-typing-inspection + python-tzdata + rust + `(,rust "cargo")) + (or (and=> (%current-target-system) + (compose list make-rust-sysroot)) + '()))) + (inputs + (cargo-inputs 'python-pydantic-core)) (propagated-inputs (list python-typing-extensions)) - (inputs (cargo-inputs 'python-pydantic-core)) (home-page "https://github.com/pydantic/pydantic-core") (synopsis "Core validation logic for pydantic") (description "This package provides the core functionality for pydantic |
