Blob Blame History Raw
%global with_python3 1

Name: python-nose-cov
Version: 1.6
Release: 2%{?dist}
Summary: nose plugin for coverage reporting, including subprocesses and multiprocessing
Source0: https://pypi.python.org/packages/source/n/nose-cov/nose-cov-%{version}.tar.gz
License: MIT
BuildArch: noarch
Url: http://bitbucket.org/memedough/nose-cov/overview

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

Requires:  python-nose
Requires:  python-cov-core

%description
This plugin produces coverage reports and supports coverage of subprocesses.

%if 0%{?with_python3}
%package -n python3-nose-cov
Summary: nose plugin for coverage reporting, including subprocesses and multiprocessing
Requires:  python3-nose
Requires:  python3-cov-core
%description -n python3-nose-cov
This plugin produces coverage reports and supports coverage of subprocesses.
%endif # with_python3

%prep
%setup -q -n nose-cov-%{version}
rm -rf nose_cov.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3

%build
%{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif

%install
%{__python2} setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
popd
%endif

%files 
%doc README.txt
%doc LICENSE.txt
%{python2_sitelib}/nose_cov*.egg-info
%{python2_sitelib}/nose_cov.py*
%if 0%{?with_python3}
%files -n python3-nose-cov
%doc README.txt
%doc LICENSE.txt
%{python3_sitelib}/nose_cov*.egg-info
%{python3_sitelib}/nose_cov.py*
%{python3_sitelib}/__pycache__/*
%endif

%changelog
* Fri Jul 10 2015 John Dulaney <jdulaney@fedoraproject.org> - 1.6-2
- Python 3

* Mon Sep 29 2014 John Dulaney <jdulaney@fedoraproject.org> - 1.6-1
- Initial packaging
- Spec based on python-nose