Drop unneeded python3 conditional

This commit is contained in:
Miro Hrončok 2018-05-17 12:40:11 +02:00
parent 90ab75af38
commit 7db239de73

View File

@ -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 <mhroncok@redhat.com> - 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 <releng@fedoraproject.org> - 1.4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild