Bug 2378140

Summary: python-radexreader: Stop using deprecated %py3_build/%py3_install macros
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-radexreaderAssignee: code <code>
Status: CLOSED COMPLETED QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-07-18 09:05:20 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: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.