From b8f7f2f8f17ea27e06ece70132c99d8eca2af2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 11 Aug 2019 11:23:07 +0200 Subject: [PATCH] Conditionalize python3-devel runtime dependencies on RPM packages Installing python3-devel currently brings in many RPM-related packages. For somebody who needs python3-devel to build extension modules, those are all useless, so we conditionalize it on rpm-build. (cherry picked from commit e9ba67b74b9849d00cfc8e332b711db142dfd3e3) --- python3.6.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python3.6.spec b/python3.6.spec index c9217a2..190964f 100644 --- a/python3.6.spec +++ b/python3.6.spec @@ -1016,9 +1016,11 @@ Summary: Libraries and header files needed for Python development Requires: %{name} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} BuildRequires: python-rpm-macros -Requires: python-rpm-macros -Requires: python3-rpm-macros -Requires: python3-rpm-generators +# The RPM related dependencies bring nothing to a non-RPM Python developer +# But we want them when packages BuildRequire python3-devel +Requires: (python-rpm-macros if rpm-build) +Requires: (python3-rpm-macros if rpm-build) +Requires: (python3-rpm-generators if rpm-build) Provides: %{name}-2to3 = %{version}-%{release} %if %{with main_python}