Blame SPECS/python-unittest2.spec

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