From a688b54c034e95691042153ddf84265f50c632a0 Mon Sep 17 00:00:00 2001 From: Haikel Guemar Date: Oct 20 2016 09:10:49 +0000 Subject: Add python3 guards --- diff --git a/python-nose-cov.spec b/python-nose-cov.spec index 8f34f21..4d0b7d6 100644 --- a/python-nose-cov.spec +++ b/python-nose-cov.spec @@ -1,3 +1,6 @@ +%if 0%{?fedora} +%global with_python3 1 +%endif Name: python-nose-cov Version: 1.6 @@ -10,8 +13,6 @@ Url: http://bitbucket.org/memedough/nose-cov/overview BuildRequires: python2-devel BuildRequires: python2-setuptools -BuildRequires: python3-devel -BuildRequires: python3-setuptools %description This plugin produces coverage reports and supports coverage of subprocesses. @@ -24,39 +25,47 @@ Requires: python-cov-core %description -n python2-nose-cov 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 +BuildRequires: python3-devel +BuildRequires: python3-setuptools Requires: python3-nose Requires: python3-cov-core %{?python_provide:%python_provide python3-nose-cov} %description -n python3-nose-cov This plugin produces coverage reports and supports coverage of subprocesses. +%endif %prep %setup -q -n nose-cov-%{version} rm -rf nose_cov.egg-info -rm -rf %{py3dir} -cp -a . %{py3dir} %build %py2_build +%if 0%{?with_python3} %py3_build +%endif %install %py2_install +%if 0%{?with_python3} %py3_install +%endif %files -n python2-nose-cov %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 * Tue Jul 19 2016 Fedora Release Engineering - 1.6-7