Bug 2377365 - osh: Stop using deprecated %py3_build/%py3_install macros
Summary: osh: Stop using deprecated %py3_build/%py3_install macros
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: osh
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2376118
TreeView+ depends on / blocked
 
Reported: 2025-07-08 14:12 UTC by Miro Hrončok
Modified: 2025-07-11 15:38 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2025-07-08 14:12:29 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 Kamil Dudka 2025-07-08 19:26:17 UTC
The new macros do not seem to be available in epel-8 buildroot:

+ %pyproject_wheel
/var/tmp/rpm-tmp.BoFF7X: line 41: fg: no job control

The OpenScanHub spec file is maintained upstream: https://github.com/openscanhub/openscanhub/blob/8ba947af7fea949a453049d1dc720422aad872ed/osh.spec#L157

Is there any way to migrate the spec file while preserving compatibility with epel-8 buildroot?

Comment 2 Miro Hrončok 2025-07-08 20:44:01 UTC
Not directly. You have 2 options for having a single compatible spec file:

 - Traditional %if spaghetti all over the spec.
 - Using Python 3.9+ on EPEL 8 and only have an %if around %genearte_buildrequires.

Comment 3 Kamil Dudka 2025-07-11 15:38:02 UTC
Fair enough.  I went for the %if spaghetti because we do not really have capacity to retest the production OSH hub with a different version of the Python stack: https://github.com/openscanhub/openscanhub/pull/321


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