Bug 2378140 - python-radexreader: Stop using deprecated %py3_build/%py3_install macros
Summary: python-radexreader: Stop using deprecated %py3_build/%py3_install macros
Keywords:
Status: CLOSED COMPLETED
Alias: None
Product: Fedora
Classification: Fedora
Component: python-radexreader
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: code@luigifab.fr
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2376118
TreeView+ depends on / blocked
 
Reported: 2025-07-08 15:04 UTC by Miro Hrončok
Modified: 2025-07-18 09:05 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-07-18 09:05:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2025-07-08 15:04:36 UTC
Dear package maintainer,

this bugzilla is automated becasue the number of impacted packages it too high to go trough manually.


It appears that your package uses the deprecated %py3_build and/or %py3_install macro.

See https://fedoraproject.org/wiki/Changes/DeprecateSetuppyMacros for why the macros are deprecated.

%py3_install expands to python setup.py install. This has been a deprecated command for 5 years and will likely stop working in Fedora 45.



Please migrate to %pyproject_buildrequires + %pyproject_wheel + %pyproject_install macros instead.

See https://fedoraproject.org/wiki/Changes/DeprecateSetuppyMacros#Migrating_to_%pyproject_macros for migration guide.

See https://github.com/hroncok/pyprojectize/ for a tool that can help you automate the migration.


Thank you. Let me know if you need help.

Comment 1 code@luigifab.fr 2025-07-12 11:01:46 UTC
Hello, I think the following changes are good. The koji build is successful.

@@ -21,3 +21,3 @@
 Version:       1.2.5
-Release:       2%{?dist}
+Release:       3%{?dist}
 Summary:       %{common_summary_en}

@@ -41,3 +41,2 @@
 BuildRequires: python3-devel
-BuildRequires: python3-setuptools
 Requires:      python3

@@ -55,5 +54,9 @@
 
+%generate_buildrequires
+cd src
+%pyproject_buildrequires
+
 %build
 cd src
-%py3_build
+%pyproject_wheel
 
@@ -61,3 +64,3 @@
 cd src
-%py3_install
+%pyproject_install
 install -Dpm 755 radexreader-cli.py %{buildroot}%{_bindir}/radexreader

@@ -67,2 +70,4 @@
 
+%pyproject_save_files radexreader
+
 %files -n python3-radexreader

@@ -70,3 +75,3 @@
 %doc README.md
-%ghost %{python3_sitelib}/radexreader*egg-info/
+%ghost %{python3_sitelib}/radexreader*dist-info/
 %{python3_sitelib}/radexreader/

@@ -79,2 +84,5 @@
 %changelog
+* Sat Jul 12 2025 Fabrice Creuzot <code> - 1.2.5-3
+- Migrating to %pyproject macros
+
 * Mon Jun 02 2025 Python Maint <python-maint> - 1.2.5-2

Comment 2 Miro Hrončok 2025-07-12 11:39:06 UTC
Yes, but please drop the "%ghost" part. It should not be there (and it should not have been even with the old macros).

It was added in https://src.fedoraproject.org/rpms/python-radexreader/c/eafa581c3a6b2b5be92d67722b68ad4d35d2eb93, but the reason for that is not said in the commit message.

Comment 3 code@luigifab.fr 2025-07-18 09:05:20 UTC
Done and Pushed.

I don't remember the reason of the %ghost keyword,
perhaps I've seen it somewhere,
then I added it.


Note You need to log in before you can comment on or make changes to this bug.