Cleanup spec
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
691946ba5d
commit
231f56ea9d
@ -1,15 +1,5 @@
|
|||||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
|
||||||
%bcond_without python3
|
|
||||||
%else
|
|
||||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
||||||
%bcond_with python3
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# %%global prever b1
|
# %%global prever b1
|
||||||
|
|
||||||
%{!?python2_shortver: %global python2_shortver %(%{__python2} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')}
|
|
||||||
%{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')}
|
|
||||||
|
|
||||||
Name: python-coverage
|
Name: python-coverage
|
||||||
Summary: Code coverage testing module for Python
|
Summary: Code coverage testing module for Python
|
||||||
Version: 4.4.1
|
Version: 4.4.1
|
||||||
@ -21,13 +11,8 @@ Release: 5%{?prever}%{?dist}
|
|||||||
# coverage/htmlfiles/jquery.hotkeys.js
|
# coverage/htmlfiles/jquery.hotkeys.js
|
||||||
# coverage/htmlfiles/jquery.isonscreen.js
|
# coverage/htmlfiles/jquery.isonscreen.js
|
||||||
License: ASL 2.0 and MIT and (MIT or GPL)
|
License: ASL 2.0 and MIT and (MIT or GPL)
|
||||||
Group: System Environment/Libraries
|
|
||||||
URL: http://nedbatchelder.com/code/modules/coverage.html
|
URL: http://nedbatchelder.com/code/modules/coverage.html
|
||||||
Source0: http://pypi.python.org/packages/source/c/coverage/coverage-%{version}%{?prever}.tar.gz
|
Source0: http://pypi.python.org/packages/source/c/coverage/coverage-%{version}%{?prever}.tar.gz
|
||||||
BuildRequires: python2-setuptools, python2-devel
|
|
||||||
%if %{with python3}
|
|
||||||
BuildRequires: python3-setuptools, python3-devel
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Coverage.py is a Python module that measures code coverage during Python
|
Coverage.py is a Python module that measures code coverage during Python
|
||||||
@ -37,7 +22,8 @@ have been executed.
|
|||||||
|
|
||||||
%package -n python2-coverage
|
%package -n python2-coverage
|
||||||
Summary: Code coverage testing module for Python 2
|
Summary: Code coverage testing module for Python 2
|
||||||
Group: System Environment/Libraries
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
# As the "coverage" executable requires the setuptools at runtime (#556290),
|
# As the "coverage" executable requires the setuptools at runtime (#556290),
|
||||||
# so the "python3-coverage" executable requires python3-setuptools:
|
# so the "python3-coverage" executable requires python3-setuptools:
|
||||||
Requires: python2-setuptools
|
Requires: python2-setuptools
|
||||||
@ -54,10 +40,10 @@ 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 %{with python3}
|
|
||||||
%package -n python3-coverage
|
%package -n python3-coverage
|
||||||
Summary: Code coverage testing module for Python 3
|
Summary: Code coverage testing module for Python 3
|
||||||
Group: System Environment/Libraries
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
# As the "coverage" executable requires the setuptools at runtime (#556290),
|
# As the "coverage" executable requires the setuptools at runtime (#556290),
|
||||||
# so the "python3-coverage" executable requires python3-setuptools:
|
# so the "python3-coverage" executable requires python3-setuptools:
|
||||||
Requires: python3-setuptools
|
Requires: python3-setuptools
|
||||||
@ -74,7 +60,6 @@ Coverage.py is a Python 3 module that measures code coverage during Python
|
|||||||
execution. It uses the code analysis tools and tracing hooks provided in the
|
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 # with python3
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n coverage-%{version}%{?prever}
|
%setup -q -n coverage-%{version}%{?prever}
|
||||||
@ -85,16 +70,11 @@ sed -i 's/\r//g' README.rst
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif # if with python3
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python3}
|
|
||||||
%py3_install
|
%py3_install
|
||||||
mv %{buildroot}/%{_bindir}/coverage %{buildroot}/%{_bindir}/python3-coverage
|
mv %{buildroot}/%{_bindir}/coverage %{buildroot}/%{_bindir}/python3-coverage
|
||||||
%endif # if with python3
|
|
||||||
|
|
||||||
%py2_install
|
%py2_install
|
||||||
|
|
||||||
@ -104,17 +84,15 @@ mv coverage python-coverage
|
|||||||
|
|
||||||
rm -rf coverage-2* coverage2
|
rm -rf coverage-2* coverage2
|
||||||
|
|
||||||
for i in python2-coverage coverage coverage2 coverage-%{?python2_shortver}; do
|
for i in python2-coverage coverage coverage2 coverage-%{python2_version}; do
|
||||||
ln -s python-coverage $i
|
ln -s python-coverage $i
|
||||||
done
|
done
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
rm -rf coverage-3* coverage3
|
rm -rf coverage-3* coverage3
|
||||||
|
|
||||||
for i in coverage3 coverage-%{?python3_shortver}; do
|
for i in coverage3 coverage-%{python3_version}; do
|
||||||
ln -s python3-coverage $i
|
ln -s python3-coverage $i
|
||||||
done
|
done
|
||||||
%endif # if with python3
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%files -n python2-coverage
|
%files -n python2-coverage
|
||||||
@ -128,7 +106,6 @@ popd
|
|||||||
%{python2_sitearch}/coverage/
|
%{python2_sitearch}/coverage/
|
||||||
%{python2_sitearch}/coverage*.egg-info/
|
%{python2_sitearch}/coverage*.egg-info/
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%files -n python3-coverage
|
%files -n python3-coverage
|
||||||
%license LICENSE.txt NOTICE.txt
|
%license LICENSE.txt NOTICE.txt
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
@ -137,11 +114,11 @@ popd
|
|||||||
%{_bindir}/python3-coverage
|
%{_bindir}/python3-coverage
|
||||||
%{python3_sitearch}/coverage/
|
%{python3_sitearch}/coverage/
|
||||||
%{python3_sitearch}/coverage*.egg-info/
|
%{python3_sitearch}/coverage*.egg-info/
|
||||||
%endif # if with python3
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Nov 04 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.4.1-5
|
* Sat Nov 04 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.4.1-5
|
||||||
- Remove platform-python subpackage
|
- Remove platform-python subpackage
|
||||||
|
- Cleanup spec
|
||||||
|
|
||||||
* Tue Aug 08 2017 Miro Hrončok <mhroncok@redhat.com> - 4.4.1-4
|
* Tue Aug 08 2017 Miro Hrončok <mhroncok@redhat.com> - 4.4.1-4
|
||||||
- Add platform-python subpackage
|
- Add platform-python subpackage
|
||||||
|
Loading…
Reference in New Issue
Block a user