From ec02bc7895c8440ec97cdff5b28f974a11ae6073 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 12 Mar 2025 09:36:45 -0400 Subject: [PATCH 1/7] =?UTF-8?q?Don=E2=80=99t=20need=20to=20manually=20expo?= =?UTF-8?q?rt=20RUSTFLAGS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [skip changelog] --- python-cramjam.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index 4919113..0fff062 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -131,7 +131,6 @@ done %build -export RUSTFLAGS='%{build_rustflags}' %cargo_license_summary %{cargo_license} > LICENSES.dependencies %pyproject_wheel From e4599f45cf022620be1c7cc8fb70b8f3dc192077 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Apr 2025 09:45:36 -0400 Subject: [PATCH 2/7] Update PyO3 to 0.24 --- ...375c2a2f96e28a1b3987f0eb5c730b4b361e.patch | 27 +++++++++++++++++++ python-cramjam.spec | 4 +++ 2 files changed, 31 insertions(+) create mode 100644 217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch diff --git a/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch b/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch new file mode 100644 index 0000000..911e068 --- /dev/null +++ b/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch @@ -0,0 +1,27 @@ +From 217c375c2a2f96e28a1b3987f0eb5c730b4b361e Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Tue, 8 Apr 2025 09:40:09 -0400 +Subject: [PATCH] Update PyO3 to 0.24 + +--- + Cargo.toml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index bf9b6831..0ab9473f 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -65,11 +65,11 @@ wasm32-compat = ["libcramjam/wasm32-compat"] + + + [dependencies] +-pyo3 = { version = "^0.23", default-features = false, features = ["macros"] } ++pyo3 = { version = "^0.24", default-features = false, features = ["macros"] } + libcramjam = { version = "^0.7", default-features = false } + + [build-dependencies] +-pyo3-build-config = "^0.23" ++pyo3-build-config = "^0.24" + + [profile.release] + strip = true diff --git a/python-cramjam.spec b/python-cramjam.spec index 0fff062..630bdea 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -33,6 +33,10 @@ Source1: get_source %endif +# Update PyO3 to 0.24 +# https://github.com/milesgranger/cramjam/pull/207 +Patch: %{url}/pull/207/commits/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch + BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 From a5b480a2e2a39e2a7bbb3189dbbf1bed5e6b0a0e Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Apr 2025 09:49:17 -0400 Subject: [PATCH 3/7] Expect maturin to handle license files --- python-cramjam.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index 630bdea..9f69bd2 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -142,7 +142,7 @@ done %install %pyproject_install -%pyproject_save_files cramjam +%pyproject_save_files -l cramjam %check @@ -165,7 +165,6 @@ k="${k-}${k+ and }not test_variants_decompress_into" %files -n python3-cramjam -f %{pyproject_files} -%license LICENSE LICENSES.dependencies %doc README.md From ef3528a4e04c3ac5e67632269b2dd90a190da419 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Apr 2025 09:52:38 -0400 Subject: [PATCH 4/7] Remove workarounds for older versions of tomcli --- python-cramjam.spec | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index 9f69bd2..37949c3 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -38,7 +38,7 @@ Source1: get_source Patch: %{url}/pull/207/commits/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch BuildRequires: python3-devel -BuildRequires: tomcli +BuildRequires: tomcli >= 0.8.0 BuildRequires: cargo-rpm-macros >= 24 %if %{with tests} @@ -95,9 +95,7 @@ tomcli set Cargo.toml del 'features.wasm32-compat' # extension with the default features, and we only want maturin to check # dependencies for those features. blosc2_isal_features="$( - # Once EPEL10 has tomcli>=0.8.0, we can use (without sed): - # tomcli get Cargo.toml features -F newline-keys - tomcli get Cargo.toml features -F toml | sed -r 's/ = .*//' | + tomcli get Cargo.toml features -F newline-keys | grep -E 'blosc2|ideflate|igzip|isal|izlib' | tr '\n' ' ' )" @@ -109,9 +107,7 @@ done # Downstream-only: remove all the static-linking features, and make the # dynamic-linking ones default, as we do in rust-libcramjam. static_features="$( - # Once EPEL10 has tomcli>=0.8.0, we can use (without sed): - # tomcli get Cargo.toml features -F newline-keys - tomcli get Cargo.toml features -F toml | sed -r 's/ = .*//' | + tomcli get Cargo.toml features -F newline-keys | grep -E '.-static$' | tr '\n' ' ' )" From c2007492dd1715e23c756e6ab94e28331c003d1e Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 12 Apr 2025 21:13:30 -0400 Subject: [PATCH 5/7] Update to 2.10.0 (close RHBZ#2359237) --- .gitignore | 1 + ...375c2a2f96e28a1b3987f0eb5c730b4b361e.patch | 27 ------------------- python-cramjam.spec | 6 +---- sources | 2 +- 4 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch diff --git a/.gitignore b/.gitignore index 1429bce..72e11ac 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /cramjam-61564e7761e38e5ec55e7939ccd6a276c2c55d11-filtered.tar.gz /cramjam-cdc7d307d0f592f89b3319a7037fd875a5371ef3-filtered.tar.gz /cramjam-2.10.0rc1.tar.gz +/cramjam-2.10.0.tar.gz diff --git a/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch b/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch deleted file mode 100644 index 911e068..0000000 --- a/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 217c375c2a2f96e28a1b3987f0eb5c730b4b361e Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Tue, 8 Apr 2025 09:40:09 -0400 -Subject: [PATCH] Update PyO3 to 0.24 - ---- - Cargo.toml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Cargo.toml b/Cargo.toml -index bf9b6831..0ab9473f 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -65,11 +65,11 @@ wasm32-compat = ["libcramjam/wasm32-compat"] - - - [dependencies] --pyo3 = { version = "^0.23", default-features = false, features = ["macros"] } -+pyo3 = { version = "^0.24", default-features = false, features = ["macros"] } - libcramjam = { version = "^0.7", default-features = false } - - [build-dependencies] --pyo3-build-config = "^0.23" -+pyo3-build-config = "^0.24" - - [profile.release] - strip = true diff --git a/python-cramjam.spec b/python-cramjam.spec index 37949c3..696117a 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -4,7 +4,7 @@ #global snapdate YYYYMMDD Name: python-cramjam -Version: 2.10.0~rc1 +Version: 2.10.0 Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust @@ -33,10 +33,6 @@ Source1: get_source %endif -# Update PyO3 to 0.24 -# https://github.com/milesgranger/cramjam/pull/207 -Patch: %{url}/pull/207/commits/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch - BuildRequires: python3-devel BuildRequires: tomcli >= 0.8.0 BuildRequires: cargo-rpm-macros >= 24 diff --git a/sources b/sources index c425e36..d44109e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-2.10.0rc1.tar.gz) = b1aa5481d0c4d0c44389f20bc2933d8b6979636dfaf2aca1ef83abb462134f2ab421993a5730471b58b49e55614100bb8279916ed68f4a7477453b82407a7c0a +SHA512 (cramjam-2.10.0.tar.gz) = 0c44643844c6278160d9e2efa3005da265e464edb1d3dd670cadc3effaa744c21c772c0bfeac1ceec6e5f7e8a9a02440d79e5080c432e4dcb73984e613281ad2 From fc6bb0f3632d9a975f678388fd0f35cac72f62d4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 3 May 2025 23:04:59 -0400 Subject: [PATCH 6/7] Report and skip test that fails with miniz_oxide>0.8.5 --- python-cramjam.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-cramjam.spec b/python-cramjam.spec index 696117a..2434432 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -152,6 +152,11 @@ done k="${k-}${k+ and }not test_variants_decompress_into" %endif +# Regression with miniz_oxide>0.8.5 +# https://github.com/milesgranger/cramjam/issues/211 +# Failed: DID NOT RAISE +k="${k-}${k+ and }not test_variants_raise_exception[deflate]" + %pytest -k "${k-}" --ignore=benchmarks/test_bench.py -v -n auto %endif From 5457d355ef69e092e9dd086f4417baf6d6c2ebd5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 5 May 2025 07:17:15 -0400 Subject: [PATCH 7/7] Bump release to avoid downgrading the EPEL10.0 package