diff --git a/0001-set-cargo-vendor-cache-for-local-build.patch b/0001-set-cargo-vendor-cache-for-local-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..84aacfe79bab9e4d83453c63fa963f004398c4d3 --- /dev/null +++ b/0001-set-cargo-vendor-cache-for-local-build.patch @@ -0,0 +1,26 @@ +From 6486b0e92cdc1e25c323f4bafa3e2a07aecb3e1b Mon Sep 17 00:00:00 2001 +From: desert-sailor +Date: Fri, 6 Dec 2024 15:48:29 +0800 +Subject: [PATCH] set cargo vendor cache for local build + +--- + .cargo/config.toml | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/.cargo/config.toml b/.cargo/config.toml +index f0ba8af..9e94ae6 100644 +--- a/.cargo/config.toml ++++ b/.cargo/config.toml +@@ -13,3 +13,9 @@ rustflags = [ + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", + ] ++ ++[source.crates-io] ++replace-with = "vendored-sources" ++ ++[source.vendored-sources] ++directory = "vendor" +-- +2.47.1 + diff --git a/cargo-vendor-cache b/cargo-vendor-cache new file mode 100644 index 0000000000000000000000000000000000000000..4b413cb38c0ff1fa28a4d6d506be2d7f3180b9b5 Binary files /dev/null and b/cargo-vendor-cache differ diff --git a/pydantic_core-2.27.1.tar.gz b/pydantic_core-2.27.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..690d3e85cd632a8e380c97b33668cc242d8b641a Binary files /dev/null and b/pydantic_core-2.27.1.tar.gz differ diff --git a/python-pydantic-core.spec b/python-pydantic-core.spec new file mode 100644 index 0000000000000000000000000000000000000000..d1498ee3487b88e720d9618e10475ab207bee07d --- /dev/null +++ b/python-pydantic-core.spec @@ -0,0 +1,57 @@ +%global _empty_manifest_terminate_build 0 +%global pypi_name pydantic-core + +Name: python-%{pypi_name} +Version: 2.27.1 +Release: 1 +Summary: Core functionality for Pydantic validation and serialization + +License: MIT +URL: https://github.com/pydantic/pydantic-core +Source0: https://files.pythonhosted.org/packages/a6/9f/7de1f19b6aea45aeb441838782d68352e71bfa98ee6fa048d5041991b33e/pydantic_core-2.27.1.tar.gz +Source1: cargo-vendor-cache +Patch1: 0001-set-cargo-vendor-cache-for-local-build.patch + +BuildRequires: rust-packaging + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-hatchling +BuildRequires: python3-maturin +BuildRequires: python3-typing-extensions + + +%description +Core functionality for Pydantic validation and serialization. + + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +Core functionality for Pydantic validation and serialization. + + +%prep +%autosetup -n pydantic_core-%{version} -p1 +tar xzvf %{SOURCE1} -C . + +%build +%pyproject_build + +%install +%pyproject_install + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{python3_sitearch}/pydantic_core +%{python3_sitearch}/pydantic_core-*.dist-info/ + + +%changelog +* Fri Dec 06 2024 Dongxing Wang - 2.27.1-1 +- Initial package.