Blame SPECS/python-unittest2.spec

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