diff --git a/python-html2text.spec b/python-html2text.spec
index 213a717..cfb9963 100644
--- a/python-html2text.spec
+++ b/python-html2text.spec
@@ -29,17 +29,22 @@ Source0: https://files.pythonhosted.org/packages/source/h/%{upname}/%{upn
BuildArch: noarch
BuildRequires: help2man
+%if %{with python2}
+BuildRequires: python2-devel
+BuildRequires: python2-setuptools
+BuildRequires: python2-pytest
+%endif
+%if %{with python3}
+BuildRequires: python%{python3_pkgversion}-devel
+BuildRequires: python%{python3_pkgversion}-setuptools
+%endif
%description
%{common_desc}
-%if %{with python2}
%package -n python2-%{upname}
Summary: %{common_sum}
-BuildRequires: python2-devel
-BuildRequires: python2-setuptools
-BuildRequires: python2-pytest
%if !%{with python3}
Provides: %{upname} = %{version}-%{release}
%endif
@@ -47,14 +52,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
-BuildRequires: python%{python3_pkgversion}-setuptools
Provides: %{upname} = %{version}-%{release}
%if !%{with python2}
Obsoletes: python2-%{upname} <= %{version}-%{release}
@@ -63,7 +64,6 @@ Obsoletes: python2-%{upname} <= %{version}-%{release}
%description -n python3-%{upname}
%{common_desc}
-%endif
%prep