From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id CHAuNn2zyGXHpwAA62LTzQ:P1 (envelope-from ) for ; Sun, 11 Feb 2024 12:46:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id CHAuNn2zyGXHpwAA62LTzQ (envelope-from ) for ; Sun, 11 Feb 2024 12:46:05 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707651965; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=VP96V88NbocYwf7Rwd9FFVRgKCIT1r6G64+O1EW6aOo=; b=Rh2i87waS6i1g6l3yUU5ZJpIKYJGu339CaoWLb6egSql7H7Mdj7kp+a5wSr3VWnWQu3HFU QvRiCSZTDQRDRlnydOZoc2PZZscH7F950kd+C2bk04UUULh62F5deIDDiNnA6v+YcsIXX1 0Hhfn2kuY6OoamqP+YjCALxm1lH0irOhqqfTX5gZmtdlTNVBFaKBLwgzwDd+nLh5FCdNOv 0bI0JhCyjVAjI1wtb3dBMdA1AufG0KRaurHZjFnYUj1+vbxCdbueU7FELk/W/UJD8zoTM0 yBHdiryZO4Z/7XZ8eptqsjpMK9/xVVyXWyMncGdQufNJI3mgyRFVBzYF/BVTQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707651965; a=rsa-sha256; cv=none; b=ahiTr1KVf2DxcebKrxYKmxk47Kul50o2YVQQWTmcPqhFQIL0kIXPUXL7BQy600if+UFJzQ p7m3mHX5OoGBY15gNT31/Nv9Q7HTvWsFEq0ped7TuiMvWYCt75piXt5C/oC95YiPray35O 3SA75EtDlATa7WVm8pHMp2d4KoZwR6yC8Nk9PAFB6uxaVZbwHOJdZcxIew2ndJMU/ox2Kc 9UlI5+IE86TzVieH3ZwUYN6hQ5Qi83kbTLCan3FJJkZ7/G5Sd87pvD6B7iY7snc8AcqoSP C/NoxXj6Z47460fsDLmLTCKZci5HDi2mWOz8vUVXvWmVHcjKgZ/p03P6k9OIIg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AB66F413AC for ; Sun, 11 Feb 2024 12:46:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZ8HQ-00061g-Nc; Sun, 11 Feb 2024 06:45:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZ8HO-000602-Jw for guix-patches@gnu.org; Sun, 11 Feb 2024 06:45:50 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZ8HO-0006Ry-BL for guix-patches@gnu.org; Sun, 11 Feb 2024 06:45:50 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZ8He-0008Fd-Fy for guix-patches@gnu.org; Sun, 11 Feb 2024 06:46:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69048] [PATCH 29/32] gnu: Add python-pydantic-core. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Feb 2024 11:46:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69048 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69048@debbugs.gnu.org Received: via spool by 69048-submit@debbugs.gnu.org id=B69048.170765193231508 (code B ref 69048); Sun, 11 Feb 2024 11:46:06 +0000 Received: (at 69048) by debbugs.gnu.org; 11 Feb 2024 11:45:32 +0000 Received: from localhost ([127.0.0.1]:41808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZ8H6-0008C6-3Q for submit@debbugs.gnu.org; Sun, 11 Feb 2024 06:45:32 -0500 Received: from mail05.noris.net ([62.128.1.225]:38095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZ8H3-0008Bc-H6 for 69048@debbugs.gnu.org; Sun, 11 Feb 2024 06:45:30 -0500 Received: from mail03.noris.net ([62.128.1.223]) by mail05.noris.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) (envelope-from ) id 1rZ8GW-000KYV-Ru for 69048@debbugs.gnu.org; Sun, 11 Feb 2024 12:44:56 +0100 Received: from p57b08159.dip0.t-ipconnect.de ([87.176.129.89] helo=hermia.goebel-consult.de) by mail03.noris.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) (envelope-from ) id 1rZ8GW-0003Zo-OW for 69048@debbugs.gnu.org; Sun, 11 Feb 2024 12:44:56 +0100 Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id 916FB5F578; Sun, 11 Feb 2024 12:44:00 +0100 (CET) From: Hartmut Goebel Date: Sun, 11 Feb 2024 12:43:38 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <60825c66932829f895e6426b36d6d290a081ffa5.1707650792.git.h.goebel@crazy-compilers.com> References: <60825c66932829f895e6426b36d6d290a081ffa5.1707650792.git.h.goebel@crazy-compilers.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Noris-IP: 87.176.129.89 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.38 X-Migadu-Queue-Id: AB66F413AC X-Spam-Score: -5.38 X-Migadu-Scanner: mx11.migadu.com X-TUID: VSjE2BTCEsh8 * gnu/packages/python-xyz.scm (python-pydantic-core): New variable. --- gnu/packages/python-xyz.scm | 84 +++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index b4b69e0f3f..4749c3f204 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -7340,6 +7340,90 @@ (define-public python-pydantic errors when data is invalid.") (license license:expat))) +(define-public python-pydantic-core + (package + (name "python-pydantic-core") + (version "2.16.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pydantic_core" version)) + (sha256 + (base32 "01hs4ynmqp2wlfvbygg4bzz3f7g5da4xw40z74ccr3cb1n2h798b")))) + (build-system cargo-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:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-before 'patch-cargo-checksums 'relax-requirements + ;; pydantic-core updates to the newest available version quite + ;; often, including e.g. serde, which Guix does not (yet) update + ;; that often to avoid "rust world rebuild". + (lambda _ + (substitute* "Cargo.toml" + (("^(serde.* = \\{ *version = \")[^\"]+(\")" _ pre post) + (string-append pre "1.0.0" post)) + (("^(enum_dispatch = \")[^\"]+(\")" _ pre post) + (string-append pre "0.3.0" post)) + (("^(smallvec = \")[^\"]+(\")" _ pre post) + (string-append pre "1.11.0" post)) + (("^(ahash = \")[^\"]+(\")" _ pre post) + (string-append pre "0.8.0" post)) + (("^(url = \")[^\"]+(\")" _ pre post) + (string-append pre "2.4.0" post)) + (("^(base64 = \")[^\"]+(\")" _ pre post) + (string-append pre "0.21.0" post)) + (("^(num-bigint = \")[^\"]+(\")" _ pre post) + (string-append pre "0.4.0" post)) + (("^(uuid = \")[^\"]+(\")" _ pre post) + (string-append pre "1.3.0" post))))) + (add-before 'patch-cargo-checksums 'fix-crate-private + (lambda _ + (substitute* "src/serializers/fields.rs" + (("pub fn (main_to_python|main_serde_serialize|add_computed_fields)" + _ name ) + (string-append "pub(crate) fn " name))))) + (add-after 'prepare-python-module 'build-python-module + (assoc-ref py:%standard-phases 'build)) + (add-after 'build-python-module 'install-python-module + (assoc-ref py:%standard-phases 'install))) + #:cargo-inputs + `(("rust-ahash" ,rust-ahash-0.8) + ("rust-base64" ,rust-base64-0.21) + ("rust-enum-dispatch" ,rust-enum-dispatch-0.3) + ("rust-idna" ,rust-idna-0.5) + ("rust-jiter" ,rust-jiter-0.0.6) + ("rust-num-bigint" ,rust-num-bigint-0.4) + ("rust-pyo3" ,rust-pyo3-0.20) + ("rust-python3-dll-a", rust-python3-dll-a-0.2) + ("rust-regex" ,rust-regex-1) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-smallvec" ,rust-smallvec-1) + ("rust-speedate" ,rust-speedate-0.13) + ("rust-strum" ,rust-strum-0.25) + ("rust-strum-macros" ,rust-strum-macros-0.25) + ("rust-url" ,rust-url-2) + ("rust-uuid" ,rust-uuid-1) + ("rust-zerocopy" ,rust-zerocopy-0.7) + ("rust-lexical-parse-float" ,rust-lexical-parse-float-0.8)) + #:install-source? #false)) + (inputs + (list maturin)) + (native-inputs + (list python-hatchling python-pytest python-wrapper)) + (propagated-inputs (list python-typing-extensions)) + (home-page "https://github.com/pydantic/pydantic-core") + (synopsis "Core functionality for pydantic") + (description "This package provides the core functionality for pydantic +validation and serialization.") + (license license:expat))) + (define-public python-pydantic-cli (package (name "python-pydantic-cli") -- 2.41.0