diff --git a/.gitignore b/.gitignore index 62b6997..f13637d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ /pyo3-0.20.0.crate /pyo3-0.20.1.crate /pyo3-0.20.2.crate +/pyo3-0.21.1.crate diff --git a/0001-drop-deny-warnings-from-doctests.patch b/0001-drop-deny-warnings-from-doctests.patch deleted file mode 100644 index 4ce7fac..0000000 --- a/0001-drop-deny-warnings-from-doctests.patch +++ /dev/null @@ -1,26 +0,0 @@ -From d4a43723777978e6fb5dca5463da3f5a548b9034 Mon Sep 17 00:00:00 2001 -From: Fabio Valentini -Date: Fri, 5 Apr 2024 10:55:47 +0200 -Subject: [PATCH] drop deny(warnings) from doctests - ---- - src/lib.rs | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/lib.rs b/src/lib.rs -index ecaaf64..c80a3bc 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -7,8 +7,7 @@ - deny( - rust_2018_idioms, - unused_lifetimes, -- rust_2021_prelude_collisions, -- warnings -+ rust_2021_prelude_collisions - ), - allow(unused_variables, unused_assignments, unused_extern_crates) - )))] --- -2.44.0 - diff --git a/pyo3-fix-metadata.diff b/pyo3-fix-metadata.diff index 05b7656..4a338db 100644 --- a/pyo3-fix-metadata.diff +++ b/pyo3-fix-metadata.diff @@ -1,19 +1,10 @@ ---- pyo3-0.20.2/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ pyo3-0.20.2/Cargo.toml 2024-01-07T21:04:53.596095+00:00 -@@ -156,7 +156,7 @@ - version = ">=1.0.70" - - [dev-dependencies.widestring] --version = "0.5.1" -+version = "1.0.2" - - [build-dependencies.pyo3-build-config] - version = "=0.20.2" -@@ -217,7 +217,6 @@ - "experimental-inspect", - "rust_decimal", +--- pyo3-0.21.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ pyo3-0.21.1/Cargo.toml 2024-04-12T19:22:47.515008+00:00 +@@ -241,7 +241,6 @@ + "serde", + "smallvec", ] -generate-import-lib = ["pyo3-ffi/generate-import-lib"] + gil-refs = [] macros = [ "pyo3-macros", - "indoc", diff --git a/rust-pyo3.spec b/rust-pyo3.spec index 8a442ea..59c2670 100644 --- a/rust-pyo3.spec +++ b/rust-pyo3.spec @@ -1,11 +1,11 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} %global crate pyo3 Name: rust-pyo3 -Version: 0.20.2 +Version: 0.21.1 Release: %autorelease Summary: Bindings to Python interpreter @@ -13,11 +13,8 @@ License: MIT OR Apache-2.0 URL: https://crates.io/crates/pyo3 Source: %{crates_source} # Manually created patch for downstream crate metadata changes -# * bump widestring dev-dependency from 0.5 to 1.0 # * drop MSVC- and MinGW-only features Patch: pyo3-fix-metadata.diff -# drop deny(warnings) from doctests to fix building with recent Rust -Patch: 0001-drop-deny-warnings-from-doctests.patch BuildRequires: cargo-rpm-macros >= 24 @@ -180,6 +177,18 @@ use the "chrono" feature of the "%{crate}" crate. %files -n %{name}+chrono-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+chrono-tz-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+chrono-tz-devel %{_description} + +This package contains library source intended for building other packages which +use the "chrono-tz" feature of the "%{crate}" crate. + +%files -n %{name}+chrono-tz-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+either-devel Summary: %{summary} BuildArch: noarch @@ -192,6 +201,30 @@ use the "either" feature of the "%{crate}" crate. %files -n %{name}+either-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+experimental-async-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+experimental-async-devel %{_description} + +This package contains library source intended for building other packages which +use the "experimental-async" feature of the "%{crate}" crate. + +%files -n %{name}+experimental-async-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+experimental-declarative-modules-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+experimental-declarative-modules-devel %{_description} + +This package contains library source intended for building other packages which +use the "experimental-declarative-modules" feature of the "%{crate}" crate. + +%files -n %{name}+experimental-declarative-modules-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+experimental-inspect-devel Summary: %{summary} BuildArch: noarch @@ -240,6 +273,18 @@ use the "full" feature of the "%{crate}" crate. %files -n %{name}+full-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+gil-refs-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+gil-refs-devel %{_description} + +This package contains library source intended for building other packages which +use the "gil-refs" feature of the "%{crate}" crate. + +%files -n %{name}+gil-refs-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+hashbrown-devel Summary: %{summary} BuildArch: noarch @@ -410,9 +455,9 @@ use the "unindent" feature of the "%{crate}" crate. %prep %autosetup -n %{crate}-%{version} -p1 +%cargo_prep # drop files that are not useful rm -r emscripten/ newsfragments/ -%cargo_prep %generate_buildrequires # unit tests require optional dependencies diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..127cff2 --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,11 @@ +[package] +cargo-toml-patch-comments = [ + "drop MSVC- and MinGW-only features", +] + +[scripts] +prep.post = [ + "# drop files that are not useful", + "rm -r emscripten/ newsfragments/", +] + diff --git a/sources b/sources index 19fcc85..cb83254 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyo3-0.20.2.crate) = cc5151a116179157046ec92677e5a72318b4cdb13a7d7e3bb83778739b5758040e5020f667dd83554a66b758581a08f5de05eb38e7b339813cec85e0712e6355 +SHA512 (pyo3-0.21.1.crate) = 6bf1c99b7c0c44ece16b3298f1090891cac2994e25730da8a82981f2296bc2d260b61df08897a2cd6c27c6e90deb70e4c08388fc70eeea6dea4b5cc451ed9598