0a6023
# what it's called on pypi
0a6023
%global srcname testtools
0a6023
# what it's imported as
0a6023
%global libname %{srcname}
0a6023
# name of egg info directory
0a6023
%global eggname %{srcname}
0a6023
# package name fragment
0a6023
%global pkgname %{srcname}
0a6023
0a6023
%global common_description %{expand:
0a6023
testtools is a set of extensions to the Python standard library's unit testing
0a6023
framework.}
0a6023
f3e0a6
# To build this package in a new environment (i.e. a new EPEL branch), you'll
f3e0a6
# need to build in a particular order.
f0ca16
#
f0ca16
# 1. python-testtools with the tests disabled
f3e0a6
# 2. python-fixtures with the tests disabled
f0ca16
# 3. python-testscenarios
f3e0a6
# 4. python-testtools and python-fixtures with tests enabled
3ce641
%bcond_without tests
0173c5
%bcond_without docs
Jeroen van Meeuwen (Kolab Systems) 7ecc60
0a6023
Name:           python-%{pkgname}
0487c2
Version:        2.4.0
60353c
Release:        6%{?dist}
Michel Alexandre Salim cd750e
Summary:        Extensions to the Python unit testing framework
Michel Alexandre Salim cd750e
Michel Alexandre Salim cd750e
License:        MIT
Michel Alexandre Salim cd750e
URL:            https://launchpad.net/testtools
0a6023
Source0:        %pypi_source
0487c2
Patch0:         testtools-2.4.0-remove_backports.patch
fecb82
# Reported as:
fecb82
# https://github.com/testing-cabal/testtools/pull/293
fecb82
Patch1:         testtools-2.4.0-fix_py39_test.patch
39c616
Michel Alexandre Salim cd750e
BuildArch:      noarch
Jeroen van Meeuwen (Kolab Systems) 7ecc60
0a6023
%description %{common_description}
0a6023
0a6023
%package -n python3-%{pkgname}
0a6023
Summary:        %{summary}
0282c8
BuildRequires:  python3-devel
0a6023
BuildRequires:  %{py3_dist setuptools extras python-mimeparse pbr}
Jeroen van Meeuwen (Kolab Systems) 7ecc60
%if %{with tests}
0a6023
BuildRequires:  %{py3_dist testscenarios}
0282c8
%endif
0a6023
%{?python_provide:%python_provide python3-%{pkgname}}
Jeroen van Meeuwen (Kolab Systems) 7ecc60
0a6023
%description -n python3-%{pkgname} %{common_description}
0282c8
0173c5
%if %{with docs}
ae2856
%package        doc
0a6023
BuildRequires:  %{py3_dist sphinx}
ae2856
Summary:        Documentation for %{name}
ae2856
Jerry James 0f1a7f
# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Packages_granted_temporary_exceptions
Jerry James 0f1a7f
Provides:       bundled(jquery)
Jerry James 0f1a7f
ae2856
%description doc
50efbb
This package contains HTML documentation for %{name}.
0173c5
%endif
ae2856
Michel Alexandre Salim cd750e
Michel Alexandre Salim cd750e
%prep
0a6023
%autosetup -p 1 -n %{srcname}-%{version}
0a6023
rm -rf %{eggname}.egg-info
fb79b1
rm testtools/_compat2x.py
0282c8
Michel Alexandre Salim cd750e
Michel Alexandre Salim cd750e
%build
0a6023
%py3_build
0282c8
0173c5
%if %{with docs}
Jerry James 0f1a7f
PYTHONPATH=$PWD make -C doc html
0173c5
%endif
Michel Alexandre Salim cd750e
Michel Alexandre Salim cd750e
Michel Alexandre Salim cd750e
%install
0a6023
%py3_install
Michel Alexandre Salim cd750e
Michel Alexandre Salim cd750e
Jeroen van Meeuwen (Kolab Systems) 7ecc60
%if %{with tests}
0707c4
%check
50efbb
make PYTHON=%{__python3} check
a9f35e
%endif
Michel Alexandre Salim cd750e
0a6023
%files -n python3-%{pkgname}
Jerry James 0f1a7f
%doc NEWS README.rst
Jerry James 0f1a7f
%license LICENSE
0a6023
%{python3_sitelib}/%{libname}
0a6023
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
0282c8
0173c5
%if %{with docs}
ae2856
%files doc
ae2856
%doc doc/_build/html/*
0173c5
%endif
ae2856
Michel Alexandre Salim cd750e
Michel Alexandre Salim cd750e
%changelog
60353c
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-6
60353c
- Rebuilt for Python 3.9
60353c
ed4e33
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-5
ed4e33
- Bootstrap for Python 3.9
ed4e33
fecb82
* Sat May 16 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 2.4.0-4
fecb82
- Fix syntax error test on Python 3.9
fecb82
3ce641
* Fri Apr 24 2020 Carl George <carl@george.computer> - 2.4.0-3
3ce641
- Enable tests
3ce641
4c1d0c
* Fri Apr 24 2020 Carl George <carl@george.computer> - 2.4.0-2
4c1d0c
- Disable tests for EPEL8 bootstrap
4c1d0c
cc0116
* Fri Apr  3 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 2.4.0-1
cc0116
- Update to 2.4.0
cc0116
cc0116
* Thu Feb 20 2020 Avram Lubkin <aviso@rockhopper.net> - 2.3.0-18
cc0116
- Patch to remove unittest2 and traceback2 from source
cc0116
cc0116
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-17
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
cc0116
cc0116
* Thu Jan 09 2020 Avram Lubkin <aviso@rockhopper.net> - 2.3.0-16
cc0116
- Remove unittest2 dependency
cc0116
- Remove traceback2 dependency
cc0116
cc0116
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-15
cc0116
- Subpackage python2-testtools has been removed
cc0116
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
cc0116
cc0116
* Thu Sep 26 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-14
cc0116
- Reduce the build dependencies by not running tests on Python 2
cc0116
cc0116
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-13
cc0116
- Rebuilt for Python 3.8
cc0116
cc0116
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-12
cc0116
- Bootstrap for Python 3.8
cc0116
cc0116
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-11
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
cc0116
cc0116
* Sat Jun 15 2019 Michel Alexandre Salim <salimma@fedoraproject.org> - 2.3.0-11
cc0116
- Update project URL
cc0116
cc0116
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-10
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
cc0116
cc0116
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-9
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
cc0116
cc0116
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-8
cc0116
- Rebuilt for Python 3.7
cc0116
cc0116
* Tue Jun 05 2018 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-7
cc0116
- Backport upstream patch for Python 3.7 support (#1577621)
cc0116
- Use python2 explicitly
cc0116
cc0116
* Fri Mar 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.3.0-6
cc0116
- Update Python 2 dependency declarations to new packaging standards
cc0116
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
cc0116
cc0116
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-5
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
cc0116
cc0116
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 2.3.0-4
cc0116
- Cleanup spec file conditionals
cc0116
cc0116
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.3.0-3
cc0116
- Python 2 binary package renamed to python2-testtools
cc0116
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
cc0116
cc0116
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cc0116
cc0116
* Wed Jun 14 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 2.3.0-1
cc0116
- Upstream 2.3.0
cc0116
- Refresh spec
cc0116
cc0116
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-8
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
cc0116
cc0116
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.8.0-7
cc0116
- Rebuild for Python 3.6
cc0116
cc0116
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-6
cc0116
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
cc0116
cc0116
* Fri Jun  3 2016 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.8.0-5
cc0116
- Add runtime dependency on traceback2 (bz#1251568)
cc0116
- Bump required version of unittest2 (bz#1304326)
cc0116
cc0116
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-4
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
cc0116
cc0116
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-3
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
cc0116
cc0116
* Tue Jul 28 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.8.0-2
cc0116
- Provide python2-testtools per updated guidelines
cc0116
cc0116
* Tue Jul 28 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.8.0-1
cc0116
- Update to 1.8.0
cc0116
cc0116
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-2
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
cc0116
cc0116
* Thu Nov 27 2014 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.5.0-1
cc0116
- Update to 1.5.0
cc0116
cc0116
* Fri Sep 19 2014 Jerry James <loganjerry@gmail.com> - 1.1.0-1
cc0116
- Update to 1.1.0 (bz 1132881)
cc0116
- Fix license handling
cc0116
- Note bundling exception for jquery in -doc
cc0116
cc0116
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.35-4
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
cc0116
cc0116
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.9.35-3
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
cc0116
cc0116
* Fri Feb 28 2014 Matthias Runge <mrunge@redhat.com> - 0.9.35-2
cc0116
- re-enable building the python3-subpackage
cc0116
cc0116
* Mon Feb  3 2014 Michel Salim <salimma@fedoraproject.org> - 0.9.35-1
cc0116
- Update to 0.9.35
cc0116
cc0116
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.32-3
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
cc0116
cc0116
* Thu Jul  4 2013 Michel Salim <salimma@fedoraproject.org> - 0.9.32-2
cc0116
- Add new runtime dep on -extras to Python3 variant as well
cc0116
cc0116
* Thu Jul  4 2013 Michel Salim <salimma@fedoraproject.org> - 0.9.32-1
cc0116
- Update to 0.9.32
cc0116
- Switch to using split-off extras package
cc0116
cc0116
* Sat May 18 2013 Pádraig Brady <pbrady@redhat.com> - 0.9.30-1
cc0116
- Update to 0.9.30
cc0116
cc0116
* Thu Feb 07 2013 Pádraig Brady <pbrady@redhat.com> - 0.9.29-1
cc0116
- Update to 0.9.29
cc0116
cc0116
* Sat Oct 27 2012 Michel Alexandre Salim <michel@sojourner> - 0.9.21-1
cc0116
- Update to 0.9.21
cc0116
cc0116
* Sat Oct 20 2012 Michel Salim <salimma@fedoraproject.org> - 0.9.19-1
cc0116
- Update to 0.9.19
cc0116
- On Fedora, also build for Python 3.x
cc0116
cc0116
* Wed Sep  5 2012 Michel Salim <salimma@fedoraproject.org> - 0.9.16-1
cc0116
- Update to 0.9.16
cc0116
- Remove deprecated sections
cc0116
cc0116
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.15-2
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
cc0116
cc0116
* Fri May 11 2012 Michel Salim <salimma@fedoraproject.org> - 0.9.15-1
cc0116
- Update to 0.9.15
cc0116
cc0116
* Thu Apr  5 2012 Michel Salim <salimma@fedoraproject.org> - 0.9.14-1
cc0116
- Update to 0.9.14
cc0116
- Enable unit tests
cc0116
cc0116
* Tue Feb  7 2012 Michel Salim <salimma@fedoraproject.org> - 0.9.13-1
cc0116
- Update to 0.9.13
cc0116
cc0116
* Tue Jan 31 2012 Michel Salim <salimma@fedoraproject.org> - 0.9.12-1
cc0116
- Update to 0.9.12
cc0116
cc0116
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.11-2
cc0116
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
cc0116
cc0116
* Fri Jul 15 2011 Michel Salim <salimma@fedoraproject.org> - 0.9.11-1
cc0116
- Update to 0.9.11
cc0116
- Enable documentation generation
cc0116
cc0116
* Thu Apr  7 2011 Michel Salim <salimma@fedoraproject.org> - 0.9.8-2
cc0116
- Add definitions needed by older RPM versions
cc0116
cc0116
* Thu Apr  7 2011 Michel Salim <salimma@fedoraproject.org> - 0.9.8-1
cc0116
- Initial package