conditionalize and disable python2 support
This commit is contained in:
parent
ba481e8b50
commit
53bfcf5ad6
@ -1,9 +1,11 @@
|
|||||||
# %%global prever b1
|
# %%global prever b1
|
||||||
|
|
||||||
|
%global py2support 0
|
||||||
|
|
||||||
Name: python-coverage
|
Name: python-coverage
|
||||||
Summary: Code coverage testing module for Python
|
Summary: Code coverage testing module for Python
|
||||||
Version: 4.5.4
|
Version: 4.5.4
|
||||||
Release: 4%{?prever}%{?dist}
|
Release: 5%{?prever}%{?dist}
|
||||||
# jquery(MIT):
|
# jquery(MIT):
|
||||||
# coverage/htmlfiles/jquery.min.js
|
# coverage/htmlfiles/jquery.min.js
|
||||||
# MIT or GPL:
|
# 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
|
Python standard library to determine which lines are executable, and which
|
||||||
have been executed.
|
have been executed.
|
||||||
|
|
||||||
|
%if %{py2support}
|
||||||
|
|
||||||
%package -n python2-coverage
|
%package -n python2-coverage
|
||||||
Summary: Code coverage testing module for Python 2
|
Summary: Code coverage testing module for Python 2
|
||||||
BuildRequires: python2-devel
|
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
|
Python standard library to determine which lines are executable, and which
|
||||||
have been executed.
|
have been executed.
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%package -n python3-coverage
|
%package -n python3-coverage
|
||||||
Summary: Code coverage testing module for Python 3
|
Summary: Code coverage testing module for Python 3
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
@ -71,24 +77,31 @@ sed -i 's/\r//g' README.rst
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{py2support}
|
||||||
%py2_build
|
%py2_build
|
||||||
|
%endif
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{py2support}
|
||||||
%py2_install
|
%py2_install
|
||||||
rm %{buildroot}/%{_bindir}/coverage
|
rm %{buildroot}/%{_bindir}/coverage
|
||||||
|
%endif
|
||||||
|
|
||||||
%py3_install
|
%py3_install
|
||||||
rm %{buildroot}/%{_bindir}/coverage
|
rm %{buildroot}/%{_bindir}/coverage
|
||||||
|
|
||||||
# make compat symlinks
|
# make compat symlinks
|
||||||
pushd %{buildroot}%{_bindir}
|
pushd %{buildroot}%{_bindir}
|
||||||
|
%if %{py2support}
|
||||||
ln -s coverage-%{python2_version} coverage-2
|
ln -s coverage-%{python2_version} coverage-2
|
||||||
|
%endif
|
||||||
ln -s coverage-%{python3_version} coverage-3
|
ln -s coverage-%{python3_version} coverage-3
|
||||||
ln -s coverage-%{python3_version} coverage
|
ln -s coverage-%{python3_version} coverage
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
|
%if %{py2support}
|
||||||
%files -n python2-coverage
|
%files -n python2-coverage
|
||||||
%license LICENSE.txt NOTICE.txt
|
%license LICENSE.txt NOTICE.txt
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
@ -96,6 +109,7 @@ popd
|
|||||||
%{_bindir}/coverage-2*
|
%{_bindir}/coverage-2*
|
||||||
%{python2_sitearch}/coverage/
|
%{python2_sitearch}/coverage/
|
||||||
%{python2_sitearch}/coverage*.egg-info/
|
%{python2_sitearch}/coverage*.egg-info/
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n python3-coverage
|
%files -n python3-coverage
|
||||||
%license LICENSE.txt NOTICE.txt
|
%license LICENSE.txt NOTICE.txt
|
||||||
@ -107,6 +121,9 @@ popd
|
|||||||
%{python3_sitearch}/coverage*.egg-info/
|
%{python3_sitearch}/coverage*.egg-info/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 12 2019 Tom Callaway <spot@fedoraproject.org> - 4.5.4-5
|
||||||
|
- conditionalize (and disable) python2 support
|
||||||
|
|
||||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.5.4-4
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.5.4-4
|
||||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user