[python-nose-cover3] add python3 support

Matthias Runge mrunge at fedoraproject.org
Sun Jul 8 20:09:44 UTC 2012


commit c904126eedf935c114ac74068922e650e9d0e177
Author: Matthias Runge <mrunge at matthias-runge.de>
Date:   Sun Jul 8 22:07:46 2012 +0200

    add python3 support

 python-nose-cover3.spec |   47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/python-nose-cover3.spec b/python-nose-cover3.spec
index d5ef7c7..07f67f7 100644
--- a/python-nose-cover3.spec
+++ b/python-nose-cover3.spec
@@ -1,8 +1,15 @@
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%else
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
+
+
 %global pypi_name nose-cover3
 
 Name:           python-%{pypi_name}
 Version:        0.1.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Coverage 3.x support for Nose
 
 License:        LGPLv2+
@@ -13,23 +20,51 @@ Requires:       python-nose
 BuildRequires:  python2-devel
 BuildRequires:  python-setuptools
 
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+%endif # if with_python3
+
 
 %description
 Coverage 3.x support for Nose.
 
+%if 0%{?with_python3}
+%package -n python3-nose-cover3
+Summary:        Coverage 3.x support for Nose
+Requires:  python3-nose
+
+%description -n python3-nose-cover3
+Coverage 3.x support for Nose.
+%endif # with_python3
+
 %prep
 %setup -q -n %{pypi_name}-%{version}
 # Remove bundled egg-info
 rm -rf %{pypi_name}.egg-info
+%if 0%{?with_python3}
+cp -a . %{py3dir}
+%endif
 
 
 
 %build
 %{__python} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
 
 
 %install
 %{__python} setup.py install --skip-build --root %{buildroot}
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
 
 
 %files
@@ -37,6 +72,16 @@ rm -rf %{pypi_name}.egg-info
 %{python_sitelib}/nosecover3
 %{python_sitelib}/nose_cover3-%{version}-py?.?.egg-info
 
+%if 0%{?with_python3}
+%files -n python3-nose-cover3
+%doc README.rst LICENSE
+%{python3_sitelib}/*
+%endif # with_python3
+
+
 %changelog
+* Sun Jul 08 2012 Matthias Runge <mrunge at matthias-runge.de> - 0.1.0-2
+- add python3 support
+
 * Tue Jun 05 2012 Matthias Runge <mrunge at matthias-runge.de> - 0.1.0-1
 - Initial package.


More information about the scm-commits mailing list