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)
This commit is contained in:
Miro Hrončok 2019-08-11 11:23:07 +02:00
commit b8f7f2f8f1

View file

@ -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}