%if 0%{?fedora} # NOTE -- upstream does not yet support python3. %global with_python3 0 %endif %{!?_licensedir: %global license %%doc} %if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %global modname detox %global sum Distributing activities of the tox tool Name: python-detox Version: 0.10.0 Release: 1%{?dist} Summary: %{sum} License: MIT URL: http://pypi.python.org/pypi/detox Source0: https://pypi.python.org/packages/source/d/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python-tox BuildRequires: python-py BuildRequires: python-eventlet %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-tox BuildRequires: python3-py BuildRequires: python3-eventlet %endif %description detox is the distributed version of the "tox" python testing tool. It makes efficient use of multiple CPUs by running all possible activities in parallel. It has the same options and configuration that tox has so after installation can just run:: $ detox in the same way and with the same options with which you would run ``tox``. %package -n python2-%{modname} Summary: Distributing activities of the tox tool %{?python_provide:%python_provide python2-%{modname}} Requires: python-tox Requires: python-py Requires: python-eventlet %description -n python2-%{modname} detox is the distributed version of the "tox" python testing tool. It makes efficient use of multiple CPUs by running all possible activities in parallel. It has the same options and configuration that tox has so after installation can just run:: $ detox in the same way and with the same options with which you would run ``tox``. %if 0%{?with_python3} %package -n python3-%{modname} Summary: distributing activities of the tox tool (py2 only) %{?python_provide:%python_provide python3-%{modname}} Requires: python3-tox Requires: python3-py Requires: python3-eventlet %description -n python3-%{modname} detox is the distributed version of the "tox" python testing tool. It makes efficient use of multiple CPUs by running all possible activities in parallel. It has the same options and configuration that tox has so after installation can just run:: $ detox in the same way and with the same options with which you would run ``tox``. %endif %prep %autosetup -n %{modname}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %check %{__python2} setup.py test %if 0%{?with_python3} %{__python3} setup.py test %endif %files -n python2-%{modname} %doc CHANGELOG %license LICENSE %{python2_sitelib}/%{modname}/ %{python2_sitelib}/%{modname}-%{version}* %{_bindir}/detox %if 0%{?with_python3} %files -n python3-%{modname} %doc CHANGELOG %license LICENSE %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-%{version}* %endif %changelog * Tue Mar 15 2016 Ralph Bean - 0.10.0-1 - Initial package for Fedora