Blame SPECS/python-unittest2.spec

c3e266
# Created by pyp2rpm-1.1.1
c3e266
%global pypi_name unittest2
c3e266
%global bootstrap_traceback2 0
c3e266
c3e266
Name:           python-%{pypi_name}
c3e266
Version:        1.1.0
c3e266
Release:        16%{?dist}
c3e266
Summary:        The new features in unittest backported to Python 2.4+
c3e266
c3e266
License:        BSD
c3e266
URL:            http://pypi.python.org/pypi/unittest2
c3e266
Source0:        https://pypi.python.org/packages/source/u/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
c3e266
# we don't need this in Fedora, since we have Python 2.7, which has argparse
c3e266
Patch0:         unittest2-1.1.0-remove-argparse-from-requires.patch
c3e266
# Conditionalize traceback2 in code (only use it for Python 2)
c3e266
Patch1:         unittest2-1.1.0-conditionalize-traceback2.patch
c3e266
# this patch backports tests from Python 3.5, that weren't yet merged, thus the tests are failing
c3e266
#  (the test is modified to also pass on Python < 3.5)
c3e266
#  TODO: submit upstream
c3e266
Patch2:         unittest2-1.1.0-backport-tests-from-py3.5.patch
c3e266
BuildArch:      noarch
c3e266
c3e266
c3e266
%description
c3e266
unittest2 is a backport of the new features added to the unittest testing
c3e266
framework in Python 2.7 and onwards. It is tested to run on Python 2.6, 2.7,
c3e266
3.2, 3.3, 3.4 and pypy.
c3e266
c3e266
c3e266
%package -n     python3-%{pypi_name}
c3e266
Summary:        The new features in unittest backported to Python 2.4+
c3e266
%{?python_provide:%python_provide python3-%{pypi_name}}
c3e266
BuildRequires:  python3-devel
c3e266
BuildRequires:  python3-setuptools
c3e266
BuildRequires:  python3-six
c3e266
%if 0%{?rhel} && 0%{?rhel} >= 8
c3e266
Requires:       platform-python-setuptools
c3e266
%else
c3e266
Requires:       python3-setuptools
c3e266
%endif
c3e266
Requires:       python3-six
c3e266
c3e266
c3e266
%description -n python3-%{pypi_name}
c3e266
unittest2 is a backport of the new features added to the unittest testing
c3e266
framework in Python 2.7 and onwards. It is tested to run on Python 2.6, 2.7,
c3e266
3.2, 3.3, 3.4 and pypy.
c3e266
c3e266
c3e266
%prep
c3e266
%setup -q -n %{pypi_name}-%{version}
c3e266
# Remove bundled egg-info
c3e266
rm -rf %{pypi_name}.egg-info
c3e266
c3e266
%patch0 -p0
c3e266
%patch2 -p0
c3e266
%patch1 -p0
c3e266
c3e266
c3e266
%build
c3e266
%py3_build
c3e266
c3e266
c3e266
%install
c3e266
%py3_install
c3e266
pushd %{buildroot}%{_bindir}
c3e266
mv unit2 unit2-%{python3_version}
c3e266
ln -s unit2-%{python3_version} unit2-3
c3e266
# compatibility symlink
c3e266
ln -s unit2-%{python3_version} python3-unit2
c3e266
popd
c3e266
c3e266
c3e266
%check
c3e266
%{__python3} -m unittest2
c3e266
c3e266
c3e266
%files -n python3-%{pypi_name}
c3e266
%doc README.txt
c3e266
%{_bindir}/unit2-3
c3e266
%{_bindir}/unit2-%{python3_version}
c3e266
%{_bindir}/python3-unit2
c3e266
%{python3_sitelib}/%{pypi_name}
c3e266
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
c3e266
c3e266
c3e266
%changelog
c3e266
* Fri Nov 16 2018 Lumír Balhar <lbalhar@redhat.com> - 1.1.0-16
c3e266
- Require platform-python-setuptools instead of python3-setuptools
c3e266
- Resolves: rhbz#1650545
c3e266
c3e266
* Mon Jul 02 2018 Petr Viktorin <pviktori@redhat.com> -1.1.0-15
c3e266
- Remove the python2 subpackage
c3e266
c3e266
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 1.1.0-14
c3e266
- Allow Python 2 for build
c3e266
  see https://hurl.corp.redhat.com/rhel8-py2
c3e266
c3e266
* Tue Jun 19 2018 Petr Viktorin <pviktori@redhat.com> - 1.1.0-13
c3e266
- Drop the python-traceback2 dependency
c3e266
c3e266
  The traceback2 module duplicates functionality from the Python standard
c3e266
  library. Use the standard library instead.
c3e266
c3e266
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-12
c3e266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c3e266
c3e266
* Wed Jan 31 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.1.0-11
c3e266
- Update Python 2 dependency declarations to new packaging standards
c3e266
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
c3e266
c3e266
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-10
c3e266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c3e266
c3e266
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-9
c3e266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c3e266
c3e266
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.1.0-8
c3e266
- Disable bootstrap method
c3e266
c3e266
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.1.0-7
c3e266
- Rebuild for Python 3.6
c3e266
c3e266
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-6
c3e266
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
c3e266
c3e266
* Thu May 19 2016 Carl George <carl.george@rackspace.com> - 1.1.0-5
c3e266
- Implement new Python packaging guidelines (python2 subpackage)
c3e266
c3e266
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
c3e266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c3e266
c3e266
* Sun Nov 15 2015 Slavek Kabrda <bkabrda@redhat.com> - 1.1.0-3
c3e266
- Fix tests on Python 3.5
c3e266
c3e266
* Sat Nov 14 2015 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.1.0-2
c3e266
- traceback2 has been bootstrapped.  Remove the bootstrapping conditional
c3e266
c3e266
* Thu Nov 12 2015 bkabrda <bkabrda@redhat.com> - 1.1.0-1
c3e266
- Update to 1.1.0
c3e266
- Bootstrap dependency on traceback2
c3e266
c3e266
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-4
c3e266
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
c3e266
c3e266
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-3
c3e266
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c3e266
c3e266
* Fri Nov 14 2014 Slavek Kabrda <bkabrda@redhat.com> - 0.8.0-2
c3e266
- Bump to avoid collision with previously blocked 0.8.0-1
c3e266
c3e266
* Mon Nov 10 2014 Slavek Kabrda <bkabrda@redhat.com> - 0.8.0-1
c3e266
- Unretire the package, create a fresh specfile