#2023 modernize our python spec files
Closed: MIGRATED a year ago by nikromen. Opened 2 years ago by msuchy.

We use %py3_build macro (e.g. in python-copr) and it fails to build on el9
https://koji.fedoraproject.org/koji/taskinfo?taskID=80582683
According to
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/
we should
a) resolve this situation for epe9
b) update our macros to match current guidelines


Metadata Update from @praiskup:
- Issue tagged with: bug

2 years ago

The epel9 problem is here:

%if 0%{?fedora} && 0%{?fedora} < 31 || 0%{?rhel} && 0%{?rhel} <= 8
BuildRequires: python3-devel
...
%endif

...

%if 0%{?fedora} > 30
BuildRequires: pyproject-rpm-macros
...

%generate_buildrequires
%pyproject_buildrequires -r
%endif

That means that when fedora is undefined and rhel is 9, neither happens.

Note thou: You should always prefer BuildRequires: python3-devel over BuildRequires: pyproject-rpm-macros, even on Fedora.

Metadata Update from @nikromen:
- Issue close_status updated to: MIGRATED
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.

Metadata