From 745ccf026157726f08aca426ea8d28b3f3d3e8c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 4 Jul 2024 14:29:41 +0200 Subject: [PATCH] Reduce and conditionalize BuildRequires - bzip2 is not used directly, only via bzip2-devel - tar is not used directly either, %autosetup uses rpmuncompress - desktop-file-utils is only used to install idle desktop file with main_python - libappstream-glib is only used to validate idle appdata file with main_python - /usr/sbin/ifconfig is no longer needed for test_uuid - gcc-c++, glibc-all-langpacks, tzdata are only used in tests (although something pulls in tzdata even with bootstrap without tests, so this one is hard to verify) - gmp-devel in not needed since Python 2.4 (mpz module was removed) - libGL-devel appears unused (and hard to find why it ever was needed) Courtesy of https://github.com/mkoncek/unbreq --- python3.13.spec | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/python3.13.spec b/python3.13.spec index 084f339..fb6894c 100644 --- a/python3.13.spec +++ b/python3.13.spec @@ -273,28 +273,34 @@ Obsoletes: python%{pybasever}%{?1:-%{1}}\ BuildRequires: autoconf BuildRequires: bluez-libs-devel -BuildRequires: bzip2 BuildRequires: bzip2-devel +%if %{with main_python} BuildRequires: desktop-file-utils +%endif # See the runtime requirement in the -libs subpackage BuildRequires: expat-devel >= 2.6 BuildRequires: findutils +BuildRequires: gcc +%if %{with tests} BuildRequires: gcc-c++ +%endif %if %{with gdbm} BuildRequires: gdbm-devel %endif BuildRequires: git-core +%if %{with tests} BuildRequires: glibc-all-langpacks +%endif BuildRequires: glibc-devel -BuildRequires: gmp-devel BuildRequires: gnupg2 +%if %{with main_python} BuildRequires: libappstream-glib +%endif %if %{undefined rhel} BuildRequires: libb2-devel %endif BuildRequires: libffi-devel -BuildRequires: libGL-devel BuildRequires: libuuid-devel BuildRequires: libX11-devel BuildRequires: make @@ -307,12 +313,15 @@ BuildRequires: python-rpm-macros BuildRequires: readline-devel BuildRequires: redhat-rpm-config >= 127 BuildRequires: sqlite-devel +%if %{with tests} BuildRequires: gdb +%endif -BuildRequires: tar BuildRequires: tcl-devel BuildRequires: tk-devel +%if %{with tests} BuildRequires: tzdata +%endif %if %{with jit} BuildRequires: clang(major) = 18 @@ -328,9 +337,6 @@ BuildRequires: zlib-devel BuildRequires: /usr/bin/dtrace -# workaround http://bugs.python.org/issue19804 (test_uuid requires ifconfig) -BuildRequires: /usr/sbin/ifconfig - %if %{with rpmwheels} # Python 3.12 removed the deprecated imp module, # the first compatible version of pip is 23.1.2.