95eee2
# %%global prever b1
95eee2
95eee2
Name:           python-coverage
95eee2
Summary:        Code coverage testing module for Python
95eee2
Version:        4.5.1
95eee2
Release:        9%{?prever}%{?dist}
95eee2
# jquery(MIT):
95eee2
#  coverage/htmlfiles/jquery.min.js
95eee2
# MIT or GPL:
95eee2
#  coverage/htmlfiles/jquery.debounce.min.js
95eee2
#  coverage/htmlfiles/jquery.hotkeys.js
95eee2
#  coverage/htmlfiles/jquery.isonscreen.js
95eee2
License:        ASL 2.0 and MIT and (MIT or GPL)
95eee2
URL:            http://nedbatchelder.com/code/modules/coverage.html
95eee2
Source0:        http://pypi.python.org/packages/source/c/coverage/coverage-%{version}%{?prever}.tar.gz
95eee2
95eee2
BuildRequires:  gcc
95eee2
95eee2
%description
95eee2
Coverage.py is a Python module that measures code coverage during Python 
95eee2
execution. It uses the code analysis tools and tracing hooks provided in the 
95eee2
Python standard library to determine which lines are executable, and which 
95eee2
have been executed.
95eee2
95eee2
%package -n platform-python-coverage
95eee2
Summary:        Code coverage testing module for Python 3
95eee2
BuildRequires:  python3-devel
95eee2
BuildRequires:  python3-setuptools
95eee2
# As the "coverage" executable requires the setuptools at runtime (#556290),
95eee2
# so the "python3-coverage" executable requires python3-setuptools:
95eee2
%if 0%{?rhel} && 0%{?rhel} >= 8
95eee2
Requires:       platform-python-setuptools
95eee2
%else
95eee2
Requires:       python3-setuptools
95eee2
%endif
95eee2
Provides:       bundled(js-jquery) = 1.11.1
95eee2
Provides:       bundled(js-jquery-debounce) = 1.1
95eee2
Provides:       bundled(js-jquery-hotkeys) = 0.8
95eee2
Provides:       bundled(js-jquery-isonscreen) = 1.2.0
95eee2
Provides:       bundled(js-jquery-tablesorter)
95eee2
95eee2
Conflicts:      python3-coverage < 4.5.1-7%{?dist}
95eee2
95eee2
%description -n platform-python-coverage
95eee2
Coverage.py is a Python 3 module that measures code coverage during Python
95eee2
execution. It uses the code analysis tools and tracing hooks provided in the 
95eee2
Python standard library to determine which lines are executable, and which 
95eee2
have been executed.
95eee2
95eee2
95eee2
%package -n python3-coverage
95eee2
Summary:        Code coverage testing module for Python 3
95eee2
Requires:       platform-python-coverage = %{version}-%{release}
95eee2
95eee2
# Require alternatives version that implements the --keep-foreign flag
95eee2
Requires(postun): alternatives >= 1.19.1-1
95eee2
# For alternatives
95eee2
Requires:       python36
95eee2
Requires(post): python36
95eee2
Requires(postun): python36
95eee2
95eee2
%{?python_provide:%python_provide python3-coverage}
95eee2
95eee2
%description -n python3-coverage
95eee2
Coverage.py is a Python 3 module that measures code coverage during Python
95eee2
execution. It uses the code analysis tools and tracing hooks provided in the 
95eee2
Python standard library to determine which lines are executable, and which 
95eee2
have been executed.
95eee2
95eee2
95eee2
%prep
95eee2
%setup -q -n coverage-%{version}%{?prever}
95eee2
95eee2
find . -type f -exec chmod 0644 \{\} \;
95eee2
sed -i 's/\r//g' README.rst
95eee2
95eee2
95eee2
%build
95eee2
%py3_build
95eee2
95eee2
%install
95eee2
%py3_install
95eee2
95eee2
# rename binaries, make compat symlinks
95eee2
pushd %{buildroot}%{_bindir}
95eee2
rm -rf coverage-3* coverage3
95eee2
mv coverage coverage-%{python3_version}
95eee2
95eee2
# All ghost files controlled by alternatives need to exist for the files
95eee2
# section check to succeed
95eee2
touch coverage-3
95eee2
popd
95eee2
95eee2
95eee2
%post -n python3-coverage
95eee2
alternatives --add-slave python3 %{_bindir}/python%{python3_version} \
95eee2
    %{_bindir}/coverage-3 \
95eee2
    coverage-3 \
95eee2
    %{_bindir}/coverage-%{python3_version}
95eee2
95eee2
%postun -n python3-coverage
95eee2
# Do this only during uninstall process (not during update)
95eee2
if [ $1 -eq 0 ]; then
95eee2
    alternatives --keep-foreign --remove-slave python3 \
95eee2
        %{_bindir}/python%{python3_version} coverage-3
95eee2
fi
95eee2
95eee2
95eee2
%files -n platform-python-coverage
95eee2
%license LICENSE.txt NOTICE.txt
95eee2
%doc README.rst
95eee2
%{python3_sitearch}/coverage/
95eee2
%{python3_sitearch}/coverage*.egg-info/
95eee2
95eee2
%files -n python3-coverage
95eee2
%license LICENSE.txt NOTICE.txt
95eee2
%doc README.rst
95eee2
%{_bindir}/coverage-%{python3_version}
95eee2
%ghost %{_bindir}/coverage-3
95eee2
95eee2
95eee2
%changelog
95eee2
* Mon Aug 23 2021 Tomas Orsava <torsava@redhat.com> - 4.5.1-9
95eee2
- Bump release to rebuild
95eee2
95eee2
* Fri Jul 30 2021 Tomas Orsava <torsava@redhat.com> - 4.5.1-8
95eee2
- Adjusted the postun scriptlets to enable upgrading to RHEL 9
95eee2
- Resolves: rhbz#1933055
95eee2
95eee2
* Wed Dec 12 2018 Tomas Orsava <torsava@redhat.com> - 4.5.1-7
95eee2
- New subpackage platform-python-coverage without files from /usr/bin/*
95eee2
- python3-coverage contains only files from /usr/bin/* and depends
95eee2
  on platform-python-coverage
95eee2
- Resolves: rhbz#1658674
95eee2
95eee2
* Fri Nov 16 2018 Lumír Balhar <lbalhar@redhat.com> - 4.5.1-6
95eee2
- Require platform-python-setuptools instead of python3-setuptools
95eee2
- Resolves: rhbz#1650532
95eee2
95eee2
* Tue Sep 25 2018 Lumír Balhar <lbalhar@redhat.com> - 4.5.1-5
95eee2
- Add alternatives for coverage-3 -> coverage-3.6
95eee2
- Resolves: rhbz#1633547
95eee2
95eee2
* Mon Aug 06 2018 Petr Viktorin <pviktori@redhat.com> - 4.5.1-4
95eee2
- Remove unversioned executables (only *-3.6 should be provided)
95eee2
95eee2
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 4.5.1-3
95eee2
- Remove the python2 subpackage
95eee2
  https://bugzilla.redhat.com/show_bug.cgi?id=1595193
95eee2
95eee2
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 4.5.1-2
95eee2
- Allow Python 2 for build
95eee2
  see https://hurl.corp.redhat.com/rhel8-py2
95eee2
95eee2
* Mon Feb 12 2018 Tom Callaway <spot@fedoraproject.org> - 4.5.1-1
95eee2
- update to 4.5.1
95eee2
95eee2
* Tue Feb  6 2018 Tom Callaway <spot@fedoraproject.org> - 4.5-1
95eee2
- update to 4.5
95eee2
95eee2
* Mon Nov 13 2017 Tom Callaway <spot@fedoraproject.org> - 4.4.2-1
95eee2
- update to 4.4.2
95eee2
95eee2
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.4.1-6
95eee2
- Use better Obsoletes for platform-python
95eee2
95eee2
* Sat Nov 04 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.4.1-5
95eee2
- Remove platform-python subpackage
95eee2
- Cleanup spec
95eee2
95eee2
* Tue Aug 08 2017 Miro Hrončok <mhroncok@redhat.com> - 4.4.1-4
95eee2
- Add platform-python subpackage
95eee2
95eee2
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.1-3
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
95eee2
95eee2
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.1-2
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
95eee2
95eee2
* Mon May 15 2017 Tom Callaway <spot@fedoraproject.org> - 4.4.1-1
95eee2
- update to 4.4.1
95eee2
95eee2
* Mon May  8 2017 Tom Callaway <spot@fedoraproject.org> - 4.4-1
95eee2
- update to 4.4
95eee2
95eee2
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.3-2
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
95eee2
95eee2
* Tue Jan 17 2017 Tom Callaway <spot@fedoraproject.org> - 4.3.3-1
95eee2
- update to 4.3.3
95eee2
95eee2
* Tue Jan 03 2017 Tom Callaway <spot@fedoraproject.org> - 4.3.1-1
95eee2
- update to 4.3.1
95eee2
95eee2
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 4.2-2
95eee2
- Rebuild for Python 3.6
95eee2
95eee2
* Fri Jul 29 2016 Tom Callaway <spot@fedoraproject.org> - 4.2-1
95eee2
- 4.2 final
95eee2
95eee2
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2-0.2.b1
95eee2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
95eee2
95eee2
* Tue Jul  5 2016 Tom Callaway <spot@fedoraproject.org> - 4.2-0.1.b1
95eee2
- update to 4.2b1
95eee2
95eee2
* Tue Jun 14 2016 Tom Callaway <spot@fedoraproject.org> - 4.1-1
95eee2
- update to 4.1
95eee2
95eee2
* Wed May 11 2016 Tom Callaway <spot@fedoraproject.org> - 4.1-0.5.b3
95eee2
- update to 4.1b3
95eee2
95eee2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-0.4.b2
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
95eee2
95eee2
* Wed Jan 27 2016 Tom Callaway <spot@fedoraproject.org> - 4.1-0.3.b2
95eee2
- update to 4.1b2
95eee2
95eee2
* Wed Jan 13 2016 Orion Poplawski <orion@cora.nwra.com> - 4.1-0.2.b1
95eee2
- Fix and install license
95eee2
- Cleanup and modernize spec
95eee2
- Note bundled jquery libraries
95eee2
95eee2
* Tue Jan 12 2016 Tom Callaway <spot@fedoraproject.org> - 4.1-0.1.b1
95eee2
- update to 4.1b1
95eee2
95eee2
* Mon Nov 30 2015 Tom Callaway <spot@fedoraproject.org> - 4.0.3-1
95eee2
- update to 4.0.3
95eee2
95eee2
* Wed Nov 11 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.2-2
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
95eee2
95eee2
* Tue Nov 10 2015 Tom Callaway <spot@fedoraproject.org> - 4.0.2-1
95eee2
- update to 4.0.2
95eee2
95eee2
* Thu Oct 29 2015 Tom Callaway <spot@fedoraproject.org> - 4.0.1-1
95eee2
- update to 4.0.1
95eee2
95eee2
* Mon Sep 28 2015 Tom Callaway <spot@fedoraproject.org> - 4.0-1
95eee2
- update to 4.0 final
95eee2
95eee2
* Wed Sep 23 2015 Robert Kuska <rkuska@redhat.com> - 4.0-0.13.b3
95eee2
- Rebuilt for Python3.5 rebuild
95eee2
95eee2
* Wed Sep  9 2015 Tom Callaway <spot@fedoraproject.org> - 4.0-0.12.b3
95eee2
- update to 4.0b3
95eee2
95eee2
* Fri Aug 28 2015 Tom Callaway <spot@fedoraproject.org> - 4.0-0.11.b2
95eee2
- update to 4.0b2
95eee2
95eee2
* Tue Aug  4 2015 Tom Callaway <spot@fedoraproject.org> - 4.0-0.10.b1
95eee2
- update to 4.0b1
95eee2
95eee2
* Mon Jul 13 2015 Tom Callaway <spot@fedoraproject.org> - 4.0-0.9.a6
95eee2
- add missing Provides: python2-coverage
95eee2
95eee2
* Tue Jul  7 2015 Tom Callaway <spot@fedoraproject.org> - 4.0-0.8.a6
95eee2
- update to 4.0a6
95eee2
95eee2
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-0.7.a5
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
95eee2
95eee2
* Sat Apr 04 2015 Ralph Bean <rbean@redhat.com> 4.0-0.6.a5
95eee2
- No longer run 2to3 on the python3 sources.
95eee2
95eee2
* Wed Mar 25 2015 Tom Callaway <spot@fedoraproject.org> 4.0-0.5.a5
95eee2
- unicode fixup
95eee2
95eee2
* Tue Feb 17 2015 Tom Callaway <spot@fedoraproject.org> 4.0-0.4.a5
95eee2
- update to 4.0a5
95eee2
95eee2
* Thu Feb  5 2015 Tom Callaway <spot@fedoraproject.org> 4.0-0.3.a3
95eee2
- update to 4.0a3
95eee2
95eee2
* Tue Jan 20 2015 Tom Callaway <spot@fedoraproject.org> 4.0-0.2.a2
95eee2
- update to 4.0a2
95eee2
95eee2
* Thu Oct  9 2014 Tom Callaway <spot@fedoraproject.org> 4.0-0.1.a
95eee2
- Update to 4.0a1
95eee2
95eee2
* Wed Aug 27 2014 Luke Macken <lmacken@redhat.com> - 3.7.1-1
95eee2
- Update to 3.7.1 (#1043090)
95eee2
95eee2
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7-4
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
95eee2
95eee2
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7-3
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
95eee2
95eee2
* Fri May 02 2014 Orion Poplawski <orion@cora.nwra.com> - 3.7-2
95eee2
- Rebuild for Python 3.4
95eee2
95eee2
* Sun Oct 20 2013 Tom Callaway <spot@fedoraproject.org> - 3.7-1
95eee2
- update to 3.7
95eee2
- fix macros for current guidelines
95eee2
- rename binary (with compat symlinks)
95eee2
95eee2
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6-2
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
95eee2
95eee2
* Fri Jun  7 2013 Tom Callaway <spot@fedoraproject.org> - 3.6-1
95eee2
- update to 3.6 final
95eee2
95eee2
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6-0.3.b3
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
95eee2
95eee2
* Wed Jan  2 2013 Tom Callaway <spot@fedoraproject.org> - 3.6-0.3.b3
95eee2
- update to 3.6beta3
95eee2
95eee2
* Thu Nov 29 2012 Tom Callaway <spot@fedoraproject.org> - 3.6-0.1.b1
95eee2
- update to 3.6beta1
95eee2
- patch0 merged into upstream
95eee2
95eee2
* Wed Oct 10 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 3.5.3-2
95eee2
- Patch from upstream for traceback when people use this with python2 and
95eee2
  python3 in the same directory
95eee2
95eee2
* Mon Oct  1 2012 Tom Callaway <spot@fedoraproject.org> - 3.5.3-1
95eee2
- update to 3.5.3
95eee2
95eee2
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 3.5.2-0.4.b1
95eee2
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
95eee2
95eee2
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 3.5.2-0.3.b1
95eee2
- remove rhel logic from with_python3 conditional
95eee2
95eee2
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.2-0.2.b1
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
95eee2
95eee2
* Wed May  2 2012 Tom Callaway <spot@fedoraproject.org> - 3.5.2-0.1.b1
95eee2
- update to 3.5.2b1
95eee2
95eee2
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.1-0.2.b1
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
95eee2
95eee2
* Fri Sep  2 2011 Tom Callaway <spot@fedoraproject.org> - 3.5.1-0.1.b1
95eee2
- update to 3.5.1b1
95eee2
95eee2
* Mon Jun  6 2011 Tom Callaway <spot@fedoraproject.org> - 3.5-0.1.b1
95eee2
- update to 3.5b1
95eee2
95eee2
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-3
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
95eee2
95eee2
* Wed Dec 29 2010  <David Malcolm <dmalcolm@redhat.com>> - 3.4-2
95eee2
- rebuild for newer python3
95eee2
95eee2
* Thu Oct 21 2010 Luke Macken <lmacken@redhat.com> - 3.4-1
95eee2
- Update to 3.4 (#631751)
95eee2
95eee2
* Fri Sep 03 2010 Luke Macken <lmacken@redhat.com> - 3.3.1-4
95eee2
- Rebuild against Python 3.2
95eee2
95eee2
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.3.1-3
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
95eee2
95eee2
* Wed May 5 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.1-2
95eee2
- Fix license tag, permissions, and filtering extraneous provides
95eee2
95eee2
* Wed May 5 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.1-1
95eee2
- Update to 3.3.1
95eee2
95eee2
* Fri Feb  5 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-3
95eee2
- add python 3 subpackage (#536948)
95eee2
95eee2
* Sun Jan 17 2010 Luke Macken <lmacken@redhat.com> - 3.2-2
95eee2
- Require python-setuptools (#556290)
95eee2
95eee2
* Wed Dec  9 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 3.2-1
95eee2
- update to 3.2
95eee2
95eee2
* Fri Oct 16 2009 Luke Macken <lmacken@redhat.com> - 3.1-1
95eee2
- Update to 3.1
95eee2
95eee2
* Wed Aug 12 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 3.0.1-1
95eee2
- update to 3.0.1
95eee2
95eee2
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.85-3
95eee2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
95eee2
95eee2
* Fri May 15 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.85-2
95eee2
- fix install invocation
95eee2
95eee2
* Wed May 6 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.85-1
95eee2
- Initial package for Fedora