Accepting request 479620 from devel:languages:python

- update for singlespec
    (this relies on newest python-rpm-macros)
- update to 4.3.4:

OBS-URL: https://build.opensuse.org/request/show/479620
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-coverage?expand=0&rev=27
This commit is contained in:
Dominique Leuenberger 2017-03-17 14:00:18 +00:00 committed by Git OBS Bridge
commit 30b420444c
4 changed files with 59 additions and 32 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fcc5838147c7b98871f32404ea9d60efc686ccca9adad3024291cb08c0b433cf
size 372102

3
coverage-4.3.4.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eaaefe0f6aa33de5a65f48dd0040d7fe08cac9ac6c35a56d0a7db109c3e733df
size 361491

View File

@ -1,3 +1,38 @@
-------------------------------------------------------------------
Mon Mar 13 17:18:44 UTC 2017 - jmatejek@suse.com
- update for singlespec
- update to 4.3.4:
- Using the --skip-covered option on an HTML report with 100% coverage would
cause a “No data to report” error, as reported in issue 549. This is now
fixed; thanks, Loïc Dachary.
- If-statements can be optimized away during compilation, for example, if 0:
or if __debug__:. Coverage.py had problems properly understanding these
statements which existed in the source, but not in the compiled bytecode.
This problem, reported in issue 522, is now fixed.
- If you specified --source as a directory, then coverage.py would look for
importable Python files in that directory, and could identify ones that had
never been executed at all. But if you specified it as a package name, that
detection wasnt performed. Now it is, closing issue 426. Thanks to Loïc
Dachary for the fix.
- If you started and stopped coverage measurement thousands of times in your
process, you could crash Python with a “Fatal Python error: deallocating
None” error. This is now fixed. Thanks to Alex Groce for the bug report.
- On PyPy, measuring coverage in subprocesses could produce a warning: “Trace
function changed, measurement is likely wrong: None”. This was spurious,
and has been suppressed.
- Previously, coverage.py couldnt start on Jython, due to that
implementation missing the multiprocessing module (issue 551). This problem
has now been fixed. Also, issue 322 about not being able to invoke coverage
conveniently, seems much better: jython -m coverage run myprog.py works
properly.
- Lets say you ran the HTML report over and over again in the same output
directory, with --skip-covered. And imagine due to your heroic test-writing
efforts, a file just acheived the goal of 100% coverage. With coverage.py
4.3, the old HTML file with the less-than-100% coverage would be left
behind. This file is now properly deleted.
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jan 14 19:28:37 UTC 2017 - hpj@urpla.net Sat Jan 14 19:28:37 UTC 2017 - hpj@urpla.net

View File

@ -16,17 +16,19 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-coverage Name: python-coverage
Version: 4.3.1 Version: 4.3.4
Release: 0 Release: 0
Url: http://nedbatchelder.com/code/coverage/%{version} Url: http://nedbatchelder.com/code/coverage/%{version}
Summary: Code coverage measurement for Python Summary: Code coverage measurement for Python
License: Apache-2.0 License: Apache-2.0
Group: Development/Languages/Python Group: Development/Languages/Python
Source: https://pypi.python.org/packages/88/3c/b4d4774e8254bd327e5303542109497d1304670c2a3e8b8f1cd8beb3de93/coverage-4.3.1.tar.gz Source: https://files.pythonhosted.org/packages/source/c/coverage/coverage-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel BuildRequires: %{python_module devel}
BuildRequires: python-setuptools BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# Test requirements: # Test requirements:
#BuildRequires: python-mock #BuildRequires: python-mock
#BuildRequires: python-nose #BuildRequires: python-nose
@ -34,10 +36,9 @@ Requires: python-setuptools
Requires: python-xml Requires: python-xml
Requires(pre): coreutils Requires(pre): coreutils
Requires(post): /usr/sbin/update-alternatives Requires(post): /usr/sbin/update-alternatives
Requires(postun): /usr/sbin/update-alternatives Requires(preun): /usr/sbin/update-alternatives
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %python_subpackages
%endif
%description %description
Coverage.py measures code coverage, typically during test execution. It uses Coverage.py measures code coverage, typically during test execution. It uses
@ -48,18 +49,13 @@ library to determine which lines are executable, and which have been executed.
%setup -q -n coverage-%{version} %setup -q -n coverage-%{version}
%build %build
python setup.py build %python_build
%install %install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} %python_install
%python_clone -a %{buildroot}%{_bindir}/coverage
mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -sf coverage-%{python2_version} %{buildroot}%{_bindir}/coverage2
for p in coverage ; do ln -sf coverage-%{python3_version} %{buildroot}%{_bindir}/coverage3
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
# create a dummy target for /etc/alternatives/$p
touch %{buildroot}%{_sysconfdir}/alternatives/$p
done
#NOTE(saschpe): The following seems to mess with the install dir, which is odd: #NOTE(saschpe): The following seems to mess with the install dir, which is odd:
#%%check #%%check
@ -71,22 +67,18 @@ done
#python igor.py test_with_tracer c #python igor.py test_with_tracer c
%post %post
update-alternatives \ %python_install_alternative coverage
--install %{_bindir}/coverage coverage %{_bindir}/coverage-%{py_ver} 30
%preun %preun
if [ $1 -eq 0 ] ; then %python_uninstall_alternative coverage
update-alternatives --remove coverage %{_bindir}/coverage-%{py_ver}
fi
%files %files %python_files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc CHANGES.rst CONTRIBUTORS.txt README.rst LICENSE.txt TODO.txt howto.txt %doc CHANGES.rst CONTRIBUTORS.txt README.rst LICENSE.txt TODO.txt howto.txt
%{_bindir}/coverage %python_alternative %{_bindir}/coverage
%{_bindir}/coverage2 %python2_only %{_bindir}/coverage2
%{_bindir}/coverage-%{py_ver} %python3_only %{_bindir}/coverage3
%ghost %{_sysconfdir}/alternatives/coverage
%{python_sitearch}/coverage/ %{python_sitearch}/coverage/
%{python_sitearch}/coverage-%{version}-py%{py_ver}.egg-info %{python_sitearch}/coverage-%{version}-py%{python_version}.egg-info
%changelog %changelog