commit b391b6fc7ee1592c5e9f729636c6ea6051dfc63c Author: zhuchunyi Date: Wed Nov 6 19:48:51 2019 +0800 update code diff --git a/coverage-4.5.3.tar.gz b/coverage-4.5.3.tar.gz new file mode 100644 index 0000000..daf41d5 Binary files /dev/null and b/coverage-4.5.3.tar.gz differ diff --git a/python-coverage.spec b/python-coverage.spec new file mode 100644 index 0000000..ec586a6 --- /dev/null +++ b/python-coverage.spec @@ -0,0 +1,97 @@ +Name: python-coverage +Version: 4.5.3 +Release: 1 +Summary: Code coverage measurement for Python + +License: ASL 2.0 and MIT and (MIT or GPL) +URL: https://coverage.readthedocs.io/en/v4.5.x/ +Source0: https://github.com/nedbat/coveragepy/archive/coverage-%{version}.tar.gz + +BuildRequires: gcc + +%description +Coverage.py is a tool for measuring code coverage of Python programs. It monitors +your program, noting which parts of the code have been executed, then analyzes the +source to identify code that could have been executed but was not. + +Coverage measurement is typically used to gauge the effectiveness of tests. It can +show which parts of your code are being exercised by tests, and which are not. + +%package -n python2-coverage +Summary: Code coverage measurement for Python 2 +BuildRequires: python2-devel python2-setuptools +Requires: python2-setuptools +%{?python_provide:%python_provide python2-coverage} +Provides: bundled(js-jquery) = 1.11.1 bundled(js-jquery-debounce) = 1.1 +Provides: bundled(js-jquery-hotkeys) = 0.8 bundled(js-jquery-tablesorter) +Provides: bundled(js-jquery-isonscreen) = 1.2.0 + +%description -n python2-coverage +Coverage.py is a tool for measuring code coverage of Python 2 programs. It monitors +your program, noting which parts of the code have been executed, then analyzes the +source to identify code that could have been executed but was not. + +%package -n python3-coverage +Summary: Code coverage measurement for Python 3 +BuildRequires: python3-devel python3-setuptools +Requires: python3-setuptools +%{?python_provide:%python_provide python3-coverage} +Provides: bundled(js-jquery) = 1.11.1 bundled(js-jquery-debounce) = 1.1 +Provides: bundled(js-jquery-hotkeys) = 0.8 bundled(js-jquery-tablesorter) +Provides: bundled(js-jquery-isonscreen) = 1.2.0 +Obsoletes: platform-python-coverage < %{version}-%{release} + +%description -n python3-coverage +Coverage.py is a tool for measuring code coverage of Python 3 programs. It monitors +your program, noting which parts of the code have been executed, then analyzes the +source to identify code that could have been executed but was not. + +%prep +%autosetup -n coverage-%{version} -p1 +sed -i 's/\r//g' README.rst +find . -type f ! -perm 0644 -exec chmod 0644 \{\} \; + +%build +%py2_build +%py3_build + +%install +%py2_install +mv %{buildroot}/%{_bindir}/coverage %{buildroot}/%{_bindir}/python-coverage + +%py3_install +mv %{buildroot}/%{_bindir}/coverage %{buildroot}/%{_bindir}/python3-coverage + +find %{buildroot}/%{_bindir} -type f -name "coverage*" -delete + +pushd %{buildroot}%{_bindir} +for i in coverage coverage2 coverage-%{python2_version} python2-coverage; do + ln -s python-coverage $i +done +ln -s python3-coverage coverage3 +ln -s python3-coverage coverage-%{python3_version} +popd + +%files -n python2-coverage +%doc README.rst +%license NOTICE.txt LICENSE.txt +%{_bindir}/coverage-%{python2_version} +%{_bindir}/coverage +%{_bindir}/coverage2 +%{_bindir}/python2-coverage +%{_bindir}/%{name} +%{python2_sitearch}/coverage/ +%{python2_sitearch}/coverage-%{version}-py?.?.egg-info/ + +%files -n python3-coverage +%doc README.rst +%license NOTICE.txt LICENSE.txt +%{_bindir}/coverage-%{python3_version} +%{_bindir}/coverage3 +%{_bindir}/python3-coverage +%{python3_sitearch}/coverage/ +%{python3_sitearch}/coverage-%{version}-py?.?.egg-info/ + +%changelog +* Sat Oct 12 2019 openEuler Buildteam - 4.5.3-1 +- Package Init