2009-06-03 15:17:25 +00:00
|
|
|
#
|
2011-05-06 12:44:31 +00:00
|
|
|
# spec file for package python-coverage
|
2009-06-03 15:17:25 +00:00
|
|
|
#
|
2014-05-08 12:05:41 +00:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2009-06-03 15:17:25 +00:00
|
|
|
#
|
|
|
|
# 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.
|
2011-06-09 10:24:33 +00:00
|
|
|
|
2011-05-06 12:44:31 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2009-06-03 15:17:25 +00:00
|
|
|
|
|
|
|
|
2011-09-08 14:33:29 +00:00
|
|
|
Name: python-coverage
|
2014-05-08 12:05:41 +00:00
|
|
|
Version: 3.7.1
|
2011-09-08 14:33:29 +00:00
|
|
|
Release: 0
|
2011-11-10 11:12:30 +00:00
|
|
|
Url: http://nedbatchelder.com/code/coverage/%{version}
|
2011-05-06 12:44:31 +00:00
|
|
|
Summary: Code coverage measurement for Python
|
2012-05-24 14:07:00 +00:00
|
|
|
License: BSD-2-Clause and (GPL-2.0+ or MIT)
|
2011-05-06 12:44:31 +00:00
|
|
|
Group: Development/Languages/Python
|
2011-09-08 14:33:29 +00:00
|
|
|
Source: http://pypi.python.org/packages/source/c/coverage/coverage-%{version}.tar.gz
|
2009-06-03 15:17:25 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-05-06 12:44:31 +00:00
|
|
|
BuildRequires: python-devel
|
2013-10-24 11:00:41 +00:00
|
|
|
BuildRequires: python-setuptools
|
2013-05-03 09:14:06 +00:00
|
|
|
# Test requirements:
|
|
|
|
#BuildRequires: python-mock
|
|
|
|
#BuildRequires: python-nose
|
2013-10-24 11:00:41 +00:00
|
|
|
Requires: python-setuptools
|
2011-05-06 12:44:31 +00:00
|
|
|
Requires: python-xml
|
2013-05-03 09:14:06 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2012-03-10 16:54:12 +00:00
|
|
|
%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)")}
|
2011-05-06 12:44:31 +00:00
|
|
|
%endif
|
2009-06-03 15:17:25 +00:00
|
|
|
|
|
|
|
%description
|
2011-05-06 12:44:31 +00:00
|
|
|
Coverage.py measures code coverage, typically during test execution. It uses
|
|
|
|
the code analysis tools and tracing hooks provided in the Python standard
|
2009-06-03 15:17:25 +00:00
|
|
|
library to determine which lines are executable, and which have been executed.
|
|
|
|
|
|
|
|
%prep
|
2011-09-08 14:33:29 +00:00
|
|
|
%setup -q -n coverage-%{version}
|
2009-06-03 15:17:25 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
%install
|
2011-05-06 12:44:31 +00:00
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2013-05-15 14:48:13 +00:00
|
|
|
rm %{buildroot}%{_bindir}/coverage
|
|
|
|
ln -s %{_bindir}/coverage-%{py_ver} %{buildroot}/%{_bindir}/coverage
|
2009-06-03 15:17:25 +00:00
|
|
|
|
2013-05-03 09:14:06 +00:00
|
|
|
#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
|
|
|
|
|
2013-05-15 14:48:13 +00:00
|
|
|
%pre
|
|
|
|
# Since /usr/bin/coverage became ghosted to be used with update-alternatives, we have
|
|
|
|
# to get rid of the old binary resulting from the non-update-alternativies-ified package:
|
|
|
|
[[ ! -L %{_bindir}/coverage ]] && rm -f %{_bindir}/coverage
|
|
|
|
exit 0
|
|
|
|
|
2013-05-03 09:14:06 +00:00
|
|
|
%post
|
|
|
|
update-alternatives \
|
2013-05-15 14:48:13 +00:00
|
|
|
--install %{_bindir}/coverage coverage %{_bindir}/coverage-%{py_ver} 20
|
2013-05-03 09:14:06 +00:00
|
|
|
|
2013-05-15 14:48:13 +00:00
|
|
|
%preun
|
2013-05-03 09:14:06 +00:00
|
|
|
if [ $1 -eq 0 ] ; then
|
2013-05-15 14:48:13 +00:00
|
|
|
update-alternatives --remove coverage %{_bindir}/coverage-%{py_ver}
|
2013-05-03 09:14:06 +00:00
|
|
|
fi
|
|
|
|
|
2011-05-06 12:44:31 +00:00
|
|
|
%files
|
2011-09-08 14:33:29 +00:00
|
|
|
%defattr(-,root,root,-)
|
2011-05-06 12:44:31 +00:00
|
|
|
%doc AUTHORS.txt CHANGES.txt README.txt
|
2013-05-15 14:48:13 +00:00
|
|
|
%ghost %{_bindir}/coverage
|
2013-05-02 09:11:59 +00:00
|
|
|
%{_bindir}/coverage2
|
|
|
|
%{_bindir}/coverage-%{py_ver}
|
2012-05-23 15:41:38 +00:00
|
|
|
%{python_sitearch}/coverage/
|
|
|
|
%{python_sitearch}/coverage-%{version}-py%{py_ver}.egg-info
|
2009-06-03 15:17:25 +00:00
|
|
|
|
|
|
|
%changelog
|