4cd3018
%global pkgname linecache2
4cd3018
11f2308
# For bootstrapping Python
11f2308
%bcond_without tests
11f2308
4cd3018
Name:           python-%{pkgname}
4cd3018
Version:        1.0.0
b246894
Release:        26%{?dist}
4cd3018
Summary:        Backport of the linecache module
4cd3018
4cd3018
License:        Python
4cd3018
URL:            https://github.com/testing-cabal/linecache2
4cd3018
Source0:        http://pypi.python.org/packages/source/l/%{pkgname}/%{pkgname}-%{version}.tar.gz
4cd3018
4cd3018
BuildArch:      noarch
11f2308
4cd3018
BuildRequires:  python3-devel
4cd3018
BuildRequires:  python3-pbr
4cd3018
# Test dependencies
11f2308
%if %{with tests}
42fbb8f
BuildRequires:  python3-fixtures
40b3cd8
%endif
4cd3018
a34f9a1
%global _description\
a34f9a1
A backport of linecache to older supported Pythons.\
a34f9a1
a34f9a1
a34f9a1
%description %_description
4cd3018
4cd3018
%package     -n python3-%{pkgname}
4cd3018
Summary:        Backport of the linecache module
4cd3018
4cd3018
%description -n python3-%{pkgname}
4cd3018
A backport of linecache to older supported Pythons.
4cd3018
4cd3018
4cd3018
4cd3018
%prep
6833c3a
%setup -qn %{pkgname}-%{version}
6833c3a
# tests shouldn't be installed
6833c3a
mv %{pkgname}/tests .
4cd3018
24e8c26
# use the standard library unittest module
24e8c26
sed -i 's/import unittest2 as unittest/import unittest/' tests/*.py
4cd3018
4cd3018
%build
6833c3a
%py3_build
4cd3018
4cd3018
4cd3018
%install
6833c3a
%py3_install
6833c3a
4cd3018
11f2308
%if %{with tests}
4cd3018
%check
6833c3a
mv tests %{pkgname}/
40b3cd8
%{__python3} -m unittest -v
6833c3a
mv %{pkgname}/tests .
40b3cd8
%endif
4cd3018
4cd3018
4cd3018
%files -n python3-%{pkgname}
6833c3a
%doc AUTHORS ChangeLog README.rst
4cd3018
%{python3_sitelib}/*
4cd3018
4cd3018
4cd3018
%changelog
b246894
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-26
b246894
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b246894
40b3cd8
* Thu Jan  9 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.0-25
40b3cd8
- Remove dependency on unittest2 (#1789200)
40b3cd8
6833c3a
* Mon Oct 07 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-24
6833c3a
- Subpackage python2-linecache2 has been removed
6833c3a
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
6833c3a
535bd16
* Thu Sep 26 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-23
535bd16
- Reduce the build dependencies by not running tests on Python 2
535bd16
06a28a6
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-22
06a28a6
- Rebuilt for Python 3.8
06a28a6
0e5d2ff
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-21
177eeae
- Bootstrap for Python 3.8
177eeae
bd26c0f
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-19
bd26c0f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
bd26c0f
3b1887d
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-18
3b1887d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3b1887d
848e105
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-17
848e105
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
848e105
6589aa5
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-16
6589aa5
- Rebuilt for Python 3.7
6589aa5
27340c0
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-15
27340c0
- Bootstrap for Python 3.7
27340c0
11f173c
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.0-14
11f173c
- Update Python 2 dependency declarations to new packaging standards
11f173c
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
11f173c
b14441f
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-13
b14441f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b14441f
0a3aada
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 1.0.0-12
0a3aada
- Cleanup spec file conditionals
0a3aada
a34f9a1
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.0-11
a34f9a1
- Python 2 binary package renamed to python2-linecache2
a34f9a1
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
a34f9a1
af1b5c7
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-10
af1b5c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
af1b5c7
bb1ba74
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-9
bb1ba74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
bb1ba74
42fbb8f
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.0.0-8
42fbb8f
- Enable tests
42fbb8f
88be55d
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.0.0-7
88be55d
- Rebuild for Python 3.6
88be55d
- Disable python3 tests
88be55d
ea6ca3e
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-6
ea6ca3e
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
ea6ca3e
6a64807
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-5
6a64807
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6a64807
a26839e
* Sat Nov 14 2015 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.0.0-4
a26839e
- And re-enable the tests
a26839e
dd6a9cc
* Sat Nov 14 2015 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.0.0-3
dd6a9cc
- Temproarily disable tests to bootstrap testtools
dd6a9cc
e8a78f9
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
e8a78f9
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
e8a78f9
4cd3018
* Wed Jul 22 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.0.0-1
4cd3018
- Initial package