Bug 2378463
| Summary: | soundconverter: Stop using deprecated %py3_build/%py3_install macros [blocked by bug in %pyproject_buildrequires] | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
| Component: | soundconverter | Assignee: | Richard Shaw <hobbes1069> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | hobbes1069, lxtnow |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-07-12 12:08:50 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2376118 | ||
|
Description
Miro Hrončok
2025-07-08 15:26:44 UTC
Following the guide, I converted the spec file but then ran into this: No match for argument: python3dist(gi) No match for argument: python3dist(gi-repository-gdk) No match for argument: python3dist(gi-repository-gio) No match for argument: python3dist(gi-repository-glib) No match for argument: python3dist(gi-repository-gobject) No match for argument: python3dist(gi-repository-gst) No match for argument: python3dist(gi-repository-gstpbutils) No match for argument: python3dist(gi-repository-gtk) No match for argument: python3dist(gi-repository-notify) No match for argument: python3dist(gi-repository-pango) No match for argument: python3dist(gi-repository-unity) Obviously these were not required with the previous method. Has upstream required this in error? Running https://pypi.org/project/pyprojectize/1a6/ on the spec produces this diff: diff --git a/soundconverter.spec b/soundconverter.spec index c6c6444..0139ed0 100644 --- a/soundconverter.spec +++ b/soundconverter.spec @@ -13,7 +13,6 @@ BuildArch: noarch BuildRequires: gcc BuildRequires: python3-devel -BuildRequires: python3-setuptools BuildRequires: python3-distutils-extra BuildRequires: python3-gobject-base BuildRequires: desktop-file-utils @@ -46,12 +45,16 @@ conversion. It can also extract the audio from videos. %autosetup -p1 +%generate_buildrequires +%pyproject_buildrequires + + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install mkdir -p %{buildroot}/usr/share/locale mv build/mo/* %{buildroot}/usr/share/locale/ @@ -80,7 +83,7 @@ rm -f %{buildroot}%{_datadir}/glib-2.0/schemas/gschemas.compiled %{_docdir}/%{name}/ %{_metainfodir}/%{name}.appdata.xml %{python3_sitelib}/%{name} -%{python3_sitelib}/%{name}-*.egg-info +%{python3_sitelib}/%{name}-*.dist-info %changelog Which then results in (from %generate_buildrequires): Handling gi from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi Handling gi.repository.GLib from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.GLib Handling gi.repository.GObject from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.GObject Handling gi.repository.Gdk from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.Gdk Handling gi.repository.Gio from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.Gio Handling gi.repository.Gst from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.Gst Handling gi.repository.GstPbutils from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.GstPbutils Handling gi.repository.Gtk from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.Gtk Handling gi.repository.Notify from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.Notify Handling gi.repository.Pango from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.Pango Handling gi.repository.Unity from hook generated metadata: Requires (soundconverter) Requirement not satisfied: gi.repository.Unity Handling pkg_resources from hook generated metadata: Requires (soundconverter) Requirement not satisfied: pkg_resources Results in: No match for argument: python3dist(gi) No match for argument: python3dist(gi-repository-gdk) No match for argument: python3dist(gi-repository-gio) No match for argument: python3dist(gi-repository-glib) No match for argument: python3dist(gi-repository-gobject) No match for argument: python3dist(gi-repository-gst) No match for argument: python3dist(gi-repository-gstpbutils) No match for argument: python3dist(gi-repository-gtk) No match for argument: python3dist(gi-repository-notify) No match for argument: python3dist(gi-repository-pango) No match for argument: python3dist(gi-repository-unity) No match for argument: python3dist(pkg-resources) It seems that the setuptools.build_meta:__legacy__ backend generates this metadata when the prepare_metadata_for_build_wheel() hook is called Requires: gi Requires: gi.repository.GLib Requires: gi.repository.GObject Requires: gi.repository.Gdk Requires: gi.repository.Gio Requires: gi.repository.Gst Requires: gi.repository.GstPbutils Requires: gi.repository.Gtk Requires: gi.repository.Notify Requires: gi.repository.Pango Requires: gi.repository.Unity Requires: pkg_resources This is likely some magic feature of https://launchpad.net/python-distutils-extra which turns imports into Requires... ? ------------- The same metadata is currently present in /usr/lib/python3.14/site-packages/soundconverter-4.0.5-py3.14.egg-info/PKG-INFO from soundconverter-0:4.0.5-6.fc43.noarch so this isn't new. The question is, why this isn't picked up by the Python runtime dependency generator already.... Oh. The runtime dependency generator only considers Requires-Dist: https://packaging.python.org/en/latest/specifications/core-metadata/#requires-dist-multiple-use While apparently, %pyproject_buildrequires also considers Requires: https://packaging.python.org/en/latest/specifications/core-metadata/#requires (which indeed lists import names, not distribution names) %pyproject_buildrequires explicitly considers both Requires-Dist and Requires: https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/570b5a6ee6015c9cdb86f649b9dbdac93a0c4531/f/pyproject_buildrequires.py#_312 This is obviously a nasty bug in %pyproject_buildrequires that no other repackage has hit yet, because nothing really uses this metadata field. Thanks, I've subscribed to the PR. Should I still need the Requires: after the transition or should they be picked up automagically? The package has no Requires-Dist in the Python metadata, so you would still need the manual RPM Requires. Also likely for python3-setuptool (includes pkg_resources imported in bin/soundconverter). FEDORA-2025-28dbdd52ff (pyproject-rpm-macros-1.18.3-1.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2025-28dbdd52ff I meant python3-setuptools. FEDORA-2025-28dbdd52ff (pyproject-rpm-macros-1.18.3-1.fc43) has been pushed to the Fedora 43 stable repository. If problem still persists, please make note of it in this bug report. Thanks for the assist! |