Do not bring Python 2 BuildRequires when not building the Python 2 package

This commit is contained in:
Miro Hrončok 2019-10-22 01:04:36 +02:00
commit 6d6c718168

View file

@ -19,7 +19,7 @@ also happens to be valid Markdown (a text-to-HTML format).
Name: python-%{upname}
Version: 2019.8.11
Release: 1%{?dist}
Release: 2%{?dist}
Summary: %{common_sum}
License: GPLv3
@ -34,6 +34,7 @@ BuildRequires: help2man
%{common_desc}
%if %{with python2}
%package -n python2-%{upname}
Summary: %{common_sum}
BuildRequires: python2-devel
@ -46,8 +47,10 @@ Provides: %{upname} = %{version}-%{release}
%description -n python2-%{upname}
%{common_desc}
%endif
%if %{with python3}
%package -n python3-%{upname}
Summary: %{common_sum}
BuildRequires: python%{python3_pkgversion}-devel
@ -60,6 +63,7 @@ Obsoletes: python2-%{upname} <= %{version}-%{release}
%description -n python3-%{upname}
%{common_desc}
%endif
%prep
@ -154,6 +158,9 @@ popd
%changelog
* Mon Oct 21 2019 Miro Hrončok <mhroncok@redhat.com> - 2019.8.11-2
- Do not bring Python 2 BuildRequires when not building the Python 2 package
* Mon Sep 09 2019 Sérgio Basto <sergio@serjux.com> - 2019.8.11-1
- Update to 2019.8.11
- Build python3-html2text on epel 7 (#1740322)