forked from pool/python-coverage
- 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 wasn’t 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 couldn’t 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. - Let’s 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. OBS-URL: https://build.opensuse.org/request/show/479281 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-coverage?expand=0&rev=54
85 lines
2.8 KiB
RPMSpec
85 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package python-coverage
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-coverage
|
|
Version: 4.3.4
|
|
Release: 0
|
|
Url: http://nedbatchelder.com/code/coverage/%{version}
|
|
Summary: Code coverage measurement for Python
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
Source: https://files.pythonhosted.org/packages/source/c/coverage/coverage-%{version}.tar.gz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: python-rpm-macros
|
|
# Test requirements:
|
|
#BuildRequires: python-mock
|
|
#BuildRequires: python-nose
|
|
Requires: python-setuptools
|
|
Requires: python-xml
|
|
Requires(pre): coreutils
|
|
Requires(post): /usr/sbin/update-alternatives
|
|
Requires(preun): /usr/sbin/update-alternatives
|
|
|
|
%python_subpackages
|
|
|
|
%description
|
|
Coverage.py measures code coverage, typically during test 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.
|
|
|
|
%prep
|
|
%setup -q -n coverage-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_clone -a %{buildroot}%{_bindir}/coverage
|
|
ln -sf coverage-%{python2_version} %{buildroot}%{_bindir}/coverage2
|
|
ln -sf coverage-%{python3_version} %{buildroot}%{_bindir}/coverage3
|
|
|
|
#NOTE(saschpe): The following seems to mess with the install dir, which is odd:
|
|
#%%check
|
|
# Taken straight from tox.ini:
|
|
#python setup.py develop
|
|
#python igor.py zip_mods install_egg remove_extension
|
|
#python igor.py test_with_tracer py
|
|
#python setup.py --quiet build_ext --inplace
|
|
#python igor.py test_with_tracer c
|
|
|
|
%post
|
|
%python_install_alternative coverage
|
|
|
|
%preun
|
|
%python_uninstall_alternative coverage
|
|
|
|
%files %python_files
|
|
%defattr(-,root,root,-)
|
|
%doc CHANGES.rst CONTRIBUTORS.txt README.rst LICENSE.txt TODO.txt howto.txt
|
|
%python_alternative %{_bindir}/coverage
|
|
%python2_only %{_bindir}/coverage2
|
|
%python3_only %{_bindir}/coverage3
|
|
%{python_sitearch}/coverage/
|
|
%{python_sitearch}/coverage-%{version}-py%{python_version}.egg-info
|
|
|
|
%changelog
|