public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/maturin] eln: Allow cargo_metadata 0.23
Date: Sun, 07 Jun 2026 23:05:42 GMT [thread overview]
Message-ID: <178087354226.1.2612647785810662772.rpms-maturin-28fb677d32e7@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/maturin
Branch : eln
Commit : 28fb677d32e7581b2f2e17222bca6aa56997ba00
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-06-07T18:57:11-04:00
Stats : +197/-15 in 7 file(s)
URL : https://src.fedoraproject.org/rpms/maturin/c/28fb677d32e7581b2f2e17222bca6aa56997ba00?branch=eln
Log:
Allow cargo_metadata 0.23
---
diff --git a/0001-drop-unavailable-features-and-unused-dev-dependencie.patch b/0001-drop-unavailable-features-and-unused-dev-dependencie.patch
index e4e013b..50dd590 100644
--- a/0001-drop-unavailable-features-and-unused-dev-dependencie.patch
+++ b/0001-drop-unavailable-features-and-unused-dev-dependencie.patch
@@ -1,7 +1,7 @@
-From 65aa60fa253df7cafc18bf51e102546a1871a754 Mon Sep 17 00:00:00 2001
+From 7abd5192fde0b322141da1bac89ff839e1aedb23 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 23 Sep 2025 22:46:35 +0200
-Subject: [PATCH 1/5] drop unavailable features and unused dev-dependencies
+Subject: [PATCH 1/6] drop unavailable features and unused dev-dependencies
---
Cargo.toml | 76 ++----------------------------------------------------
@@ -122,5 +122,5 @@ index f950f92f..2c04871a 100644
inherits = "release"
debug = true
--
-2.51.0
+2.52.0
diff --git a/0002-drop-incompatible-cargo-flags-from-setuptools_rust.patch b/0002-drop-incompatible-cargo-flags-from-setuptools_rust.patch
index 643360c..c8d2213 100644
--- a/0002-drop-incompatible-cargo-flags-from-setuptools_rust.patch
+++ b/0002-drop-incompatible-cargo-flags-from-setuptools_rust.patch
@@ -1,7 +1,7 @@
-From 931197d07d97689ec15270dde34f3e910ae10133 Mon Sep 17 00:00:00 2001
+From 8d3ca80d401db386ccb5e7568c395a78eede6edc Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Mon, 19 May 2025 21:57:43 +0200
-Subject: [PATCH 2/5] drop incompatible cargo flags from setuptools_rust
+Subject: [PATCH 2/6] drop incompatible cargo flags from setuptools_rust
---
setup.py | 18 +-----------------
@@ -46,5 +46,5 @@ index 5d9fd285..5c56178f 100644
zip_safe=False,
)
--
-2.51.0
+2.52.0
diff --git a/0003-remove-shebang-from-non-executable-__init__.py-file.patch b/0003-remove-shebang-from-non-executable-__init__.py-file.patch
index b9b5680..de7f491 100644
--- a/0003-remove-shebang-from-non-executable-__init__.py-file.patch
+++ b/0003-remove-shebang-from-non-executable-__init__.py-file.patch
@@ -1,7 +1,7 @@
-From 6ebecea1cc8c65f76fdd867d84b9a3bbe42f6e25 Mon Sep 17 00:00:00 2001
+From 50af2191b38f5adee1d7c28210179eb0cb117312 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 12 Dec 2023 12:36:00 +0100
-Subject: [PATCH 3/5] remove shebang from non-executable __init__.py file
+Subject: [PATCH 3/6] remove shebang from non-executable __init__.py file
---
maturin/__init__.py | 1 -
@@ -17,5 +17,5 @@ index b8ee63eb..bf6c4103 100644
maturin's implementation of the PEP 517 interface. Calls maturin through subprocess
--
-2.51.0
+2.52.0
diff --git a/0004-Bump-base64-from-0.21-to-0.22-and-itertools-from-0.1.patch b/0004-Bump-base64-from-0.21-to-0.22-and-itertools-from-0.1.patch
index 565f50e..dcdc0a1 100644
--- a/0004-Bump-base64-from-0.21-to-0.22-and-itertools-from-0.1.patch
+++ b/0004-Bump-base64-from-0.21-to-0.22-and-itertools-from-0.1.patch
@@ -1,7 +1,7 @@
-From c732469292ccf589915d29f79586f33a304fa2ac Mon Sep 17 00:00:00 2001
+From 7675ff766bb21e50b577d4c8da5d745929f298f3 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Wed, 19 Mar 2025 15:49:22 +0100
-Subject: [PATCH 4/5] Bump base64 from 0.21 to 0.22 and itertools from 0.12 to
+Subject: [PATCH 4/6] Bump base64 from 0.21 to 0.22 and itertools from 0.12 to
0.14
---
@@ -31,5 +31,5 @@ index 2c04871a..8c6ae4b6 100644
cc = "1.0.88"
dunce = "1.0.2"
--
-2.51.0
+2.52.0
diff --git a/0005-revert-to-using-setuptools-for-non-maturin-bootstrap.patch b/0005-revert-to-using-setuptools-for-non-maturin-bootstrap.patch
index 90630b5..d6a4d45 100644
--- a/0005-revert-to-using-setuptools-for-non-maturin-bootstrap.patch
+++ b/0005-revert-to-using-setuptools-for-non-maturin-bootstrap.patch
@@ -1,7 +1,7 @@
-From 232f5cc557f0bc468fa238c5743ee68c22a1d4c0 Mon Sep 17 00:00:00 2001
+From cc78b683075ebf8e096013c2ef09b2615875acd1 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 23 Sep 2025 22:47:53 +0200
-Subject: [PATCH 5/5] revert to using setuptools for non-maturin bootstrap
+Subject: [PATCH 5/6] revert to using setuptools for non-maturin bootstrap
build
---
@@ -26,5 +26,5 @@ index c1fcb4b1..5cf98f5e 100644
[project]
name = "maturin"
--
-2.51.0
+2.52.0
diff --git a/0006-Update-cargo_metadata-to-0.20.0-2864.patch b/0006-Update-cargo_metadata-to-0.20.0-2864.patch
new file mode 100644
index 0000000..749469c
--- /dev/null
+++ b/0006-Update-cargo_metadata-to-0.20.0-2864.patch
@@ -0,0 +1,176 @@
+From 637b05baf51fe9ab11b105fa248a60b49cc64501 Mon Sep 17 00:00:00 2001
+From: Eashwar Ranganathan <eashwar@eashwar.com>
+Date: Thu, 20 Nov 2025 18:51:25 -0500
+Subject: [PATCH 6/6] Update cargo_metadata to 0.20.0 (#2864)
+
+---
+ Cargo.toml | 2 +-
+ src/build_options.rs | 32 +++++++++++++++++++++-----------
+ src/compile.rs | 6 +++---
+ src/metadata.rs | 2 +-
+ src/source_distribution.rs | 4 ++--
+ 5 files changed, 28 insertions(+), 18 deletions(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 8c6ae4b6..7d0ffca5 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -43,7 +43,7 @@ anyhow = "1.0.80"
+ base64 = "0.22.0"
+ glob = "0.3.0"
+ cargo-config2 = "0.1.24"
+-cargo_metadata = "0.19.0"
++cargo_metadata = ">=0.20.0, <0.24.0"
+ cargo-options = "0.7.2"
+ cbindgen = { version = "0.29.0", default-features = false }
+ flate2 = "1.0.18"
+diff --git a/src/build_options.rs b/src/build_options.rs
+index f0a7c9e2..2a52e837 100644
+--- a/src/build_options.rs
++++ b/src/build_options.rs
+@@ -935,16 +935,16 @@ fn filter_cargo_targets(
+ config_targets: Option<&[crate::pyproject_toml::CargoTarget]>,
+ ) -> Result<Vec<CompileTarget>> {
+ let root_pkg = cargo_metadata.root_package().unwrap();
+- let resolved_features = cargo_metadata
++ let resolved_features: Vec<String> = cargo_metadata
+ .resolve
+ .as_ref()
+- .and_then(|resolve| resolve.nodes.iter().find(|node| node.id == root_pkg.id))
+- .map(|node| node.features.clone())
++ .and_then(|resolve| resolve.nodes.iter().find(|&node| node.id == root_pkg.id))
++ .map(|node| node.features.iter().map(|f| f.to_string()).collect())
+ .unwrap_or_default();
+ let mut targets: Vec<_> = root_pkg
+ .targets
+ .iter()
+- .filter(|target| match bridge {
++ .filter(|&target| match bridge {
+ BridgeModel::Bin(_) => {
+ let is_bin = target.is_bin();
+ if target.required_features.is_empty() {
+@@ -1017,15 +1017,19 @@ fn filter_cargo_targets(
+ fn has_abi3(deps: &HashMap<&str, &Node>) -> Result<Option<Abi3Version>> {
+ for &lib in PYO3_BINDING_CRATES.iter() {
+ let lib = lib.as_str();
+- if let Some(pyo3_crate) = deps.get(lib) {
++ if let Some(&pyo3_crate) = deps.get(lib) {
+ // Find the minimal abi3 python version. If there is none, abi3 hasn't been selected
+ // This parser abi3-py{major}{minor} and returns the minimal (major, minor) tuple
+- let abi3_selected = pyo3_crate.features.iter().any(|x| x == "abi3");
++ let abi3_selected = pyo3_crate
++ .features
++ .iter()
++ .map(AsRef::as_ref)
++ .any(|x| x == "abi3");
+
+ let min_abi3_version = pyo3_crate
+ .features
+ .iter()
+- .filter(|x| x.starts_with("abi3-py") && x.len() >= "abi3-pyxx".len())
++ .filter(|&x| x.starts_with("abi3-py") && x.len() >= "abi3-pyxx".len())
+ .map(|x| {
+ Ok((
+ (x.as_bytes()[7] as char).to_string().parse::<u8>()?,
+@@ -1061,10 +1065,11 @@ fn is_generating_import_lib(cargo_metadata: &Metadata) -> Result<bool> {
+ .filter(|package| cargo_metadata[&package.id].name.as_str() == lib)
+ .collect::<Vec<_>>();
+ match pyo3_packages.as_slice() {
+- [pyo3_crate] => {
++ &[pyo3_crate] => {
+ let generate_import_lib = pyo3_crate
+ .features
+ .iter()
++ .map(AsRef::as_ref)
+ .any(|x| x == "generate-import-lib" || x == "generate-abi3-import-lib");
+ return Ok(generate_import_lib);
+ }
+@@ -1165,9 +1170,9 @@ pub fn find_bridge(cargo_metadata: &Metadata, bridge: Option<&str>) -> Result<Br
+ .packages
+ .iter()
+ .filter_map(|pkg| {
+- let name = &pkg.name;
++ let name = pkg.name.as_ref();
+ if name == "pyo3" || name == "pyo3-ffi" || name == "cpython" || name == "uniffi" {
+- Some((name.as_ref(), pkg))
++ Some((name, pkg))
+ } else {
+ None
+ }
+@@ -1231,7 +1236,12 @@ pub fn find_bridge(cargo_metadata: &Metadata, bridge: Option<&str>) -> Result<Br
+ if !bridge.is_bin() && bridge.is_pyo3_crate(lib) {
+ let lib_name = lib.as_str();
+ let pyo3_node = deps[lib_name];
+- if !pyo3_node.features.contains(&"extension-module".to_string()) {
++ if !pyo3_node
++ .features
++ .iter()
++ .map(AsRef::as_ref)
++ .any(|f| f == "extension-module")
++ {
+ let version = cargo_metadata[&pyo3_node.id].version.to_string();
+ eprintln!(
+ "⚠️ Warning: You're building a library without activating {lib}'s \
+diff --git a/src/compile.rs b/src/compile.rs
+index 52812deb..75287d65 100644
+--- a/src/compile.rs
++++ b/src/compile.rs
+@@ -541,7 +541,7 @@ fn compile_target(
+ };
+
+ // Extract the location of the .so/.dll/etc. from cargo's json output
+- if crate_name == &context.crate_name {
++ if crate_name.as_ref() == context.crate_name {
+ let tuples = artifact
+ .target
+ .crate_types
+@@ -686,9 +686,9 @@ fn pyo3_version(cargo_metadata: &cargo_metadata::Metadata) -> Option<(u64, u64,
+ .packages
+ .iter()
+ .filter_map(|pkg| {
+- let name = &pkg.name;
++ let name = pkg.name.as_ref();
+ if name == "pyo3" || name == "pyo3-ffi" {
+- Some((name.as_ref(), pkg))
++ Some((name, pkg))
+ } else {
+ None
+ }
+diff --git a/src/metadata.rs b/src/metadata.rs
+index f65dabb3..08646af5 100644
+--- a/src/metadata.rs
++++ b/src/metadata.rs
+@@ -528,7 +528,7 @@ impl Metadata24 {
+ license: package.license.clone(),
+ license_files,
+ project_url,
+- ..Metadata24::new(name, version)
++ ..Metadata24::new(name.to_string(), version)
+ };
+ Ok(metadata)
+ }
+diff --git a/src/source_distribution.rs b/src/source_distribution.rs
+index 0dc7a2a5..d0ea47b9 100644
+--- a/src/source_distribution.rs
++++ b/src/source_distribution.rs
+@@ -342,7 +342,7 @@ pub fn find_path_deps(cargo_metadata: &Metadata) -> Result<HashMap<String, PathD
+ let dependency = top
+ .dependencies
+ .iter()
+- .find(|package| {
++ .find(|&package| {
+ // Package ids are opaque and there seems to be no way to query their name.
+ let dep_name = &cargo_metadata
+ .packages
+@@ -350,7 +350,7 @@ pub fn find_path_deps(cargo_metadata: &Metadata) -> Result<HashMap<String, PathD
+ .find(|package| &package.id == dep_id)
+ .unwrap()
+ .name;
+- &package.name == dep_name
++ package.name == dep_name.as_ref()
+ })
+ .unwrap();
+ if let Some(path) = &dependency.path {
+--
+2.52.0
+
diff --git a/maturin.spec b/maturin.spec
index c872640..d1c9d9b 100644
--- a/maturin.spec
+++ b/maturin.spec
@@ -83,6 +83,12 @@ Patch: 0004-Bump-base64-from-0.21-to-0.22-and-itertools-from-0.1.patch
# * revert to building maturin with setuptools instead of boostrapping maturin
Patch: 0005-revert-to-using-setuptools-for-non-maturin-bootstrap.patch
+# * Update cargo_metadata to 0.20.0: https://github.com/PyO3/maturin/pull/2864.
+# Further widen the allowed versions to permit cargo_metadata 0.23, which was
+# considered upstream in https://github.com/PyO3/maturin/pull/2817, but
+# rejected for now due (solely) to MSRV.
+Patch: 0006-Update-cargo_metadata-to-0.20.0-2864.patch
+
%if %{defined rhel}
BuildRequires: rust-toolset
%else
reply other threads:[~2026-06-07 23:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178087354226.1.2612647785810662772.rpms-maturin-28fb677d32e7@fedoraproject.org \
--to=code@musicinmybrain.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox