Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Python Maint
bf768eb3fc Rebuilt for Python 3.15.0b4 ABI change 2026-07-22 10:11:21 +02:00
Fedora Release Engineering
923249903d Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:33:16 +00:00
Python Maint
5e7be441c6 Rebuilt for Python 3.15 2026-06-05 15:31:24 +02:00
Ondrej Mosnáček
a7d34984d3
Fix build on EPEL9 and enable optimized init on EPEL10
Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
2026-04-05 17:51:23 +02:00

View file

@ -1,8 +1,7 @@
%if 0%{?epel}
# EPEL status as of 2025-01-23:
# EPEL status as of 2026-04-05:
# EPEL 9: fails on a weird error in %%pyproject_install
# EPEL 10: missing rust-uzers
%bcond optimized_init 0
%bcond optimized_init %[%epel >= 10]
# No python-mcp yet in EPEL
%bcond mcp 0
%else
@ -73,6 +72,22 @@ virtme-ng is based on virtme, written by Andy Lutomirski <luto@kernel.org>.
%prep
%forgeautosetup -p1
%if 0%{?epel} && 0%{?epel} < 10
# EPEL 9: work around no PEP 604
for file in \
virtme/util.py \
virtme/architectures.py \
virtme/mkinitramfs.py \
virtme/qemu_helpers.py \
virtme/commands/run.py
do
sed -i \
-e '1i from typing import Optional' \
-e 's/\(:\|->\) \([a-zA-Z][^:->]*\) | None/\1 Optional[\2]/g' \
$file
done
%endif
%if %{with optimized_init}
# Don't strip the debuginfo - let the rpm macros do it.
sed -i 's/\["strip", /["true", /' setup.py