From 872f90ea81d7f9fe6beaeb591e1ccf402570ec1c Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 29 Jan 2023 00:58:57 +0100 Subject: [PATCH] Update to version 0.17.3 --- .gitignore | 1 + ...ests-for-little-endian-things-on-big.patch | 26 +++++++++++++++ pyo3-fix-metadata.diff | 32 +++++++++---------- rust-pyo3.spec | 19 ++++++++++- sources | 2 +- 5 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 0002-Ensure-to-skip-tests-for-little-endian-things-on-big.patch diff --git a/.gitignore b/.gitignore index 4a899b9..0d5131a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /pyo3-0.15.1.crate /pyo3-0.15.2.crate /pyo3-0.16.6.crate +/pyo3-0.17.3.crate diff --git a/0002-Ensure-to-skip-tests-for-little-endian-things-on-big.patch b/0002-Ensure-to-skip-tests-for-little-endian-things-on-big.patch new file mode 100644 index 0000000..8ca694a --- /dev/null +++ b/0002-Ensure-to-skip-tests-for-little-endian-things-on-big.patch @@ -0,0 +1,26 @@ +From 7dd21aa26aa44890eec3b9331a932b84150595c3 Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Thu, 26 Jan 2023 18:35:24 +0100 +Subject: [PATCH] Ensure to skip tests for little-endian things on big-endian + arches + +--- + src/ffi/tests.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ffi/tests.rs b/src/ffi/tests.rs +index a0d3250..0800682 100644 +--- a/src/ffi/tests.rs ++++ b/src/ffi/tests.rs +@@ -87,7 +87,7 @@ fn test_timezone_from_offset() { + } + + #[test] +-#[cfg(feature = "macros")] ++#[cfg(all(feature = "macros", target_endian = "little"))] + #[cfg_attr(target_arch = "wasm32", ignore)] // DateTime import fails on wasm for mysterious reasons + fn test_timezone_from_offset_and_name() { + use crate::types::PyDelta; +-- +2.39.1 + diff --git a/pyo3-fix-metadata.diff b/pyo3-fix-metadata.diff index f97b9da..32e4a01 100644 --- a/pyo3-fix-metadata.diff +++ b/pyo3-fix-metadata.diff @@ -1,6 +1,6 @@ ---- pyo3-0.16.6/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ pyo3-0.16.6/Cargo.toml 2023-01-17T19:53:56.296203+00:00 -@@ -56,52 +56,6 @@ +--- pyo3-0.17.3/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ pyo3-0.17.3/Cargo.toml 2023-01-26T16:06:04.822303+00:00 +@@ -57,52 +57,6 @@ "docsrs", ] @@ -53,7 +53,7 @@ [dependencies.anyhow] version = "1.0" optional = true -@@ -118,7 +72,7 @@ +@@ -123,7 +77,7 @@ optional = true [dependencies.indexmap] @@ -62,27 +62,27 @@ optional = true [dependencies.indoc] -@@ -161,9 +115,6 @@ - [dev-dependencies.assert_approx_eq] - version = "1.1.0" +@@ -171,9 +125,6 @@ + [dev-dependencies.chrono] + version = "0.4" +- -[dev-dependencies.criterion] -version = "0.3.5" -- + [dev-dependencies.proptest] version = "0.10.1" - features = ["std"] -@@ -171,9 +122,6 @@ - +@@ -186,9 +137,6 @@ [dev-dependencies.rustversion] version = "1.0" -- + -[dev-dependencies.send_wrapper] -version = "0.5" - +- [dev-dependencies.serde] version = "1.0" -@@ -184,9 +132,6 @@ + features = ["derive"] +@@ -198,9 +146,6 @@ [dev-dependencies.trybuild] version = "1.0.49" @@ -91,8 +91,8 @@ -version = "0.5.1" [build-dependencies.pyo3-build-config] - version = "0.16.6" -@@ -236,8 +181,6 @@ + version = "0.17.3" +@@ -247,8 +192,6 @@ "eyre", "anyhow", ] diff --git a/rust-pyo3.spec b/rust-pyo3.spec index d18e09c..a66213f 100644 --- a/rust-pyo3.spec +++ b/rust-pyo3.spec @@ -5,7 +5,7 @@ %global crate pyo3 Name: rust-pyo3 -Version: 0.16.6 +Version: 0.17.3 Release: %autorelease Summary: Bindings to Python interpreter @@ -21,6 +21,8 @@ Source: %{crates_source} Patch: pyo3-fix-metadata.diff # * skip the single doctest that depends on send_wrapper Patch: 0001-ignore-doctest-with-missing-send_wrapper-dependency.patch +# * skip a little-endian-specific test on big-endian arches +Patch: 0002-Ensure-to-skip-tests-for-little-endian-things-on-big.patch BuildRequires: rust-packaging >= 21 @@ -45,6 +47,7 @@ use the "%{crate}" crate. %doc %{crate_instdir}/Code-of-Conduct.md %doc %{crate_instdir}/Contributing.md %doc %{crate_instdir}/README.md +%doc %{crate_instdir}/Releasing.md %{crate_instdir}/ %package -n %{name}+default-devel @@ -143,6 +146,18 @@ use the "auto-initialize" feature of the "%{crate}" crate. %files -n %{name}+auto-initialize-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+chrono-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+chrono-devel %{_description} + +This package contains library source intended for building other packages which +use the "chrono" feature of the "%{crate}" crate. + +%files -n %{name}+chrono-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+extension-module-devel Summary: %{summary} BuildArch: noarch @@ -337,6 +352,8 @@ use the "unindent" feature of the "%{crate}" crate. %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 +# drop files that are not useful +rm -r emscripten/ newsfragments/ # drop broken trybuild ui tests rm tests/test_compile_error.rs # drop the tests for which dependencies were removed diff --git a/sources b/sources index 9176688..634bc10 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyo3-0.16.6.crate) = fe297e4d171ecb5a965ce9f3a0527a086766ac5607ba7b59b2a3a8f6cc66da3959d93f1d6aa688d67ceebde41ac4adefce18c0d52c1b77d0cd95cf1178f52325 +SHA512 (pyo3-0.17.3.crate) = 5c83ea76202edce13c370d023562a9009382e36fdf3fcd7c4dea844ab8e5e048db4cc79a9c0ea98fb7017a83da16924ba0981ad98bd83e75e2fac434738e9740