From 7db239de739668a172b3f6879f2dbc9d9084e700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 17 May 2018 12:40:11 +0200 Subject: [PATCH] Drop unneeded python3 conditional --- python-sure.spec | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/python-sure.spec b/python-sure.spec index e53076d..e2627ae 100644 --- a/python-sure.spec +++ b/python-sure.spec @@ -1,10 +1,3 @@ -# Created by pyp2rpm-0.5.1 -# if building for SCL or on RHEL, don't build python3- subpackage -%if 0%{?fedora} || 0%{?rhel} > 7 -%global with_python3 1 -%else -%global with_python3 0 -%endif %global pypi_name sure Name: python-%{pypi_name} @@ -24,18 +17,17 @@ BuildRequires: python-setuptools BuildRequires: python-six Requires: python-six -%if 0%{with_python3} BuildRequires: python3-devel BuildRequires: python3-mock BuildRequires: python3-nose BuildRequires: python3-setuptools BuildRequires: python3-six -%endif %description A testing library for Python with powerful and flexible assertions. Sure is heavily inspired by should.js. + %package -n python2-%{pypi_name} Summary: %{summary} 2 %{?python_provide:%python_provide python2-%{pypi_name}} @@ -44,7 +36,7 @@ Summary: %{summary} 2 A testing library for Python with powerful and flexible assertions. Sure is heavily inspired by should.js. -%if 0%{?with_python3} + %package -n python3-%{pypi_name} Summary: %{summary} 3 %{?python_provide:%python_provide python3-%{pypi_name}} @@ -53,45 +45,39 @@ Requires: python3-six %description -n python3-%{pypi_name} A testing library for Python with powerful and flexible assertions. Sure is heavily inspired by should.js. -%endif # with_python3 + %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info + %build %py2_build - -%if 0%{with_python3} %py3_build -%endif + %install %py2_install - -%if 0%{?with_python3} %py3_install -%endif # with_python3 + %check %{__python2} -m nose --verbosity 2 - -%if 0%{?with_python3} %{__python3} -m nose --verbosity 2 -%endif # with_python3 + %files -n python2-%{pypi_name} %doc COPYING %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info -%if 0%{?with_python3} %files -n python3-%{pypi_name} %doc COPYING %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info -%endif + %changelog * Thu May 17 2018 Miro HronĨok - 1.4.10-1 @@ -100,6 +86,7 @@ rm -rf %{pypi_name}.egg-info - Removed an unneeded shebeng sed - Drop %%sum macro, use %%summary - Drop forbidden SCL macros +- Drop unneeded python3 conditional * Fri Feb 09 2018 Fedora Release Engineering - 1.4.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild