- update to version 4.5.2: * Namespace packages are supported on Python 3.7 * Python 3.8 (as of today!) passes all tests OBS-URL: https://build.opensuse.org/request/show/662290 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-coverage?expand=0&rev=73
87 lines
2.8 KiB
RPMSpec
87 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package python-coverage
|
|
#
|
|
# Copyright (c) 2018 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.5.2
|
|
Release: 0
|
|
Summary: Code coverage measurement for Python
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/nedbat/coveragepy
|
|
Source: https://files.pythonhosted.org/packages/source/c/coverage/coverage-%{version}.tar.gz
|
|
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(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
Requires(pre): coreutils
|
|
%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
|
|
%if 0%{?have_python2} && ! 0%{?skip_python2}
|
|
ln -sf coverage-%{python2_version} %{buildroot}%{_bindir}/coverage2
|
|
%endif
|
|
%if 0%{?have_python3} && ! 0%{?skip_python3}
|
|
ln -sf coverage-%{python3_version} %{buildroot}%{_bindir}/coverage3
|
|
%endif
|
|
|
|
#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
|
|
|
|
%postun
|
|
%python_uninstall_alternative coverage
|
|
|
|
%files %{python_files}
|
|
%license LICENSE.txt
|
|
%doc CHANGES.rst CONTRIBUTORS.txt README.rst 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
|