public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/maturin] f44: Use dynamic buildrequires for patchelf
@ 2026-11-22 10:44 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-11-22 10:44 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/maturin
Branch : f44
Commit : c5e5fa830c3c5a45bb15500ec6a238e4c266d23e
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-11-17T18:13:15-05:00
Stats : +6/-26 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/maturin/c/c5e5fa830c3c5a45bb15500ec6a238e4c266d23e?branch=f44
Log:
Use dynamic buildrequires for patchelf
patchelf now includes a Python metadata subpackage which fulfills this
dependency.
https://src.fedoraproject.org/rpms/patchelf/pull-request/6
---
diff --git a/maturin.spec b/maturin.spec
index 4f89a4e..cd613b2 100644
--- a/maturin.spec
+++ b/maturin.spec
@@ -98,9 +98,6 @@ Patch: 0002-drop-incompatible-cargo-flags-from-setuptools_rust.patch
Patch: 0003-revert-to-using-setuptools-for-non-maturin-bootstrap.patch
BuildRequires: cargo-rpm-macros >= 24
-%if %{with patchelf}
-BuildRequires: tomcli
-%endif
# Some sdist tests expect to see .gitignore files in the sdist, which only
# happens when they are run from inside a git repository, which we create via
@@ -126,35 +123,18 @@ well as rust binaries as python packages.
# a hack for installing the zig toolchain via PyPI, but we could work around
# that. More importantly, we have patched out support for cross-compiling
# with cargo-zigbuild, so there is no point in exposing this extra.
+# patchelf:
+# We do have patchelf in Fedora, and python3dist(patchelf) is provided by
+# the python3-patchelf subpackage which requires patchelf and includes the
+# necessary metadata to register it as a Python package.
%if %{with patchelf}
-# Based on %%pyproject_extras_subpkg -n maturin patchelf, but we have added
-# a dependency on the patchelf command-line tool.
-%package -n maturin+patchelf
-Summary: Metapackage for maturin: patchelf extras
-
-Requires: maturin%{?_isa} = %{version}-%{release}
-Requires: /usr/bin/patchelf
-
-%description -n maturin+patchelf
-This is a metapackage bringing in patchelf extras requires for maturin.
-It makes sure the dependencies are installed.
-
-%files -n maturin+patchelf -f %{_pyproject_ghost_distinfo}
+%pyproject_extras_subpkg -n maturin patchelf
%endif
%prep
%autosetup -n maturin-%{version} -p1 -S git
%cargo_prep
-%if %{with patchelf}
-# We don’t have python3dist(patchelf), corresponding to
-# https://pypi.org/project/patchelf/, which is just a hack for installing the
-# patchelf tool via PyPI. We can still provide the extra by ensuring the
-# system-wide patchelf command-line tool is installed.
-tomcli set pyproject.toml lists delitem \
- project.optional-dependencies.patchelf patchelf
-%endif
-
# Ensure we don’t use Cargo.lock files from any of the test crates.
find test-crates -type f -name Cargo.lock -print -delete
@@ -163,7 +143,7 @@ find test-crates -type f -name Cargo.lock -print -delete
rm test-data/py.exe
%generate_buildrequires
-%pyproject_buildrequires -x patchelf
+%pyproject_buildrequires %{?with_patchelf:-x patchelf}
%cargo_generate_buildrequires -f schemars
%if %{with check}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-22 10:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-22 10:44 [rpms/maturin] f44: Use dynamic buildrequires for patchelf Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox