Make /usr/bin/coverage Python 3

- Remove /usr/bin/python*-coverage links to cleanse tab completion results
- Drop no longer needed Obsoletes for platform-python-coverage
This commit is contained in:
Miro Hrončok 2019-08-12 12:42:41 +02:00
parent 595009883f
commit 79e23daa12

View File

@ -3,7 +3,7 @@
Name: python-coverage
Summary: Code coverage testing module for Python
Version: 4.5.4
Release: 1%{?prever}%{?dist}
Release: 2%{?prever}%{?dist}
# jquery(MIT):
# coverage/htmlfiles/jquery.min.js
# MIT or GPL:
@ -55,7 +55,7 @@ Provides: bundled(js-jquery-debounce) = 1.1
Provides: bundled(js-jquery-hotkeys) = 0.8
Provides: bundled(js-jquery-isonscreen) = 1.2.0
Provides: bundled(js-jquery-tablesorter)
Obsoletes: platform-python-coverage < %{version}-%{release}
Conflicts: python2-coverage < 4.5.4-2
%description -n python3-coverage
Coverage.py is a Python 3 module that measures code coverage during Python
@ -75,49 +75,43 @@ sed -i 's/\r//g' README.rst
%py3_build
%install
%py3_install
mv %{buildroot}/%{_bindir}/coverage %{buildroot}/%{_bindir}/python3-coverage
%py2_install
rm %{buildroot}/%{_bindir}/coverage
# rename binaries, make compat symlinks
%py3_install
rm %{buildroot}/%{_bindir}/coverage
# make compat symlinks
pushd %{buildroot}%{_bindir}
mv coverage python-coverage
rm -rf coverage-2* coverage2
for i in python2-coverage coverage coverage2 coverage-%{python2_version}; do
ln -s python-coverage $i
done
rm -rf coverage-3* coverage3
for i in coverage3 coverage-%{python3_version}; do
ln -s python3-coverage $i
done
ln -s coverage-%{python2_version} coverage-2
ln -s coverage-%{python3_version} coverage-3
ln -s coverage-%{python3_version} coverage
popd
%files -n python2-coverage
%license LICENSE.txt NOTICE.txt
%doc README.rst
%{_bindir}/coverage
%{_bindir}/coverage2
%{_bindir}/coverage-2*
%{_bindir}/python-coverage
%{_bindir}/python2-coverage
%{python2_sitearch}/coverage/
%{python2_sitearch}/coverage*.egg-info/
%files -n python3-coverage
%license LICENSE.txt NOTICE.txt
%doc README.rst
%{_bindir}/coverage-3*
%{_bindir}/coverage
%{_bindir}/coverage3
%{_bindir}/python3-coverage
%{_bindir}/coverage-3*
%{python3_sitearch}/coverage/
%{python3_sitearch}/coverage*.egg-info/
%changelog
* Mon Aug 12 2019 Miro Hrončok <mhroncok@redhat.com> - 4.5.4-2
- Make /usr/bin/coverage Python 3
- Remove /usr/bin/python*-coverage links to cleanse tab completion results
- Drop no longer needed Obsoletes for platform-python-coverage
* Mon Aug 5 2019 Tom Callaway <spot@fedoraproject.org> - 4.5.4-1
- update to 4.5.4