From 53bfcf5ad664903f94e2b7b77e8d2c8ee5e9851a Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 12 Nov 2019 16:25:48 -0500 Subject: [PATCH] conditionalize and disable python2 support --- python-coverage.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/python-coverage.spec b/python-coverage.spec index 1abddd4..23148f2 100644 --- a/python-coverage.spec +++ b/python-coverage.spec @@ -1,9 +1,11 @@ # %%global prever b1 +%global py2support 0 + Name: python-coverage Summary: Code coverage testing module for Python Version: 4.5.4 -Release: 4%{?prever}%{?dist} +Release: 5%{?prever}%{?dist} # jquery(MIT): # coverage/htmlfiles/jquery.min.js # MIT or GPL: @@ -22,6 +24,8 @@ execution. It uses the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed. +%if %{py2support} + %package -n python2-coverage Summary: Code coverage testing module for Python 2 BuildRequires: python2-devel @@ -42,6 +46,8 @@ execution. It uses the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed. +%endif + %package -n python3-coverage Summary: Code coverage testing module for Python 3 BuildRequires: python3-devel @@ -71,24 +77,31 @@ sed -i 's/\r//g' README.rst %build +%if %{py2support} %py2_build +%endif %py3_build %install +%if %{py2support} %py2_install rm %{buildroot}/%{_bindir}/coverage +%endif %py3_install rm %{buildroot}/%{_bindir}/coverage # make compat symlinks pushd %{buildroot}%{_bindir} +%if %{py2support} ln -s coverage-%{python2_version} coverage-2 +%endif ln -s coverage-%{python3_version} coverage-3 ln -s coverage-%{python3_version} coverage popd +%if %{py2support} %files -n python2-coverage %license LICENSE.txt NOTICE.txt %doc README.rst @@ -96,6 +109,7 @@ popd %{_bindir}/coverage-2* %{python2_sitearch}/coverage/ %{python2_sitearch}/coverage*.egg-info/ +%endif %files -n python3-coverage %license LICENSE.txt NOTICE.txt @@ -107,6 +121,9 @@ popd %{python3_sitearch}/coverage*.egg-info/ %changelog +* Mon Nov 12 2019 Tom Callaway - 4.5.4-5 +- conditionalize (and disable) python2 support + * Thu Oct 03 2019 Miro HronĨok - 4.5.4-4 - Rebuilt for Python 3.8.0rc1 (#1748018)