%if 0%{?fedora} > 12 # virtualenv for python3 is missing %global with_python3 1 %endif # Tests requiring Internet connections are disabled by default # pass --with internet to run them (e.g. when doing a local rebuild # for sanity checks before committing) %bcond_with internet %global pypiname tox Name: python-tox Version: 2.3.1 Release: 1%{?dist} Summary: Virtualenv-based automation of test activities # file toxbootstrap.py is licensed under MIT License License: GPLv2+ and MIT URL: http://codespeak.net/tox Source0: http://pypi.python.org/packages/source/t/%{pypiname}/%{pypiname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools Requires: python-py Requires: python-virtualenv >= 1.11.2 Requires: python-pluggy # required for check %if 0%{?fedora} BuildRequires: python-py BuildRequires: pytest BuildRequires: python-virtualenv >= 1.11.2 %endif %description Tox as is a generic virtualenv management and test command line tool you can use for: - checking your package installs correctly with different Python versions and interpreters - running your tests in each of the environments, configuring your test tool of choice - acting as a frontend to Continuous Integration servers, greatly reducing boilerplate and merging CI and shell-based testing. %if 0%{?with_python3} %package -n python3-%{pypiname} Summary: Virtualenv-based automation of test activities Requires: python3-py Requires: python3-pluggy # python3-virtualenv is rhbz#537246 Requires: python3-virtualenv BuildRequires: python3-py BuildRequires: python3-pytest BuildRequires: python3-virtualenv %description -n python3-%{pypiname} Tox as is a generic virtualenv management and test command line tool you can use for: - checking your package installs correctly with different Python versions and interpreters - running your tests in each of the environments, configuring your test tool of choice - acting as a frontend to Continuous Integration servers, greatly reducing boilerplate and merging CI and shell-based testing. %endif %prep %setup -q -n %{pypiname}-%{version} # remove bundled egg-info rm -rf %{pypiname}.egg-info %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} mv %{buildroot}%{_bindir}/tox %{buildroot}%{_bindir}/python3-tox mv %{buildroot}%{_bindir}/tox-quickstart %{buildroot}%{_bindir}/python3-tox-quickstart popd %endif # with_python3 %{__python} setup.py install -O1 --skip-build --root %{buildroot} # if internet connection available, run tests %if %{with internet} %check # python 2.7: fedora 17, fedora 18 # python 3.2: fedora 17 # python 3.3: fedora 18 # el6: buildrequirements missing #%if 0%{?rhel}==6 #TOXENV=py26 %{__python} setup.py test #%endif %if 0%{?fedora}>=17 TOXENV=py27 %{__python} setup.py test %endif %endif %files %doc ISSUES.txt doc %license LICENSE %{_bindir}/%{pypiname} %{_bindir}/%{pypiname}-quickstart %{python_sitelib}/%{pypiname} %{python_sitelib}/%{pypiname}-%{version}-py2.?.egg-info %if 0%{?with_python3} %files -n python3-tox %{_bindir}/python3-%{pypiname} %{_bindir}/python3-%{pypiname}-quickstart %{python3_sitelib}/%{pypiname} %{python3_sitelib}/%{pypiname}-%{version}-py%{python3_version}.egg-info %endif %changelog * Mon Feb 29 2016 Matthias Runge - 2.3.1-1 - update to 2.3.1 * Thu Feb 04 2016 Fedora Release Engineering - 2.1.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Nov 12 2015 Kalev Lember - 2.1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Tue Aug 25 2015 Matthias Runge - 2.1.1-2 - add requirement: python-pluggy * Tue Aug 18 2015 Matthias Runge - 2.1.1-1 - update to 2.1.1 * Thu Jun 18 2015 Fedora Release Engineering - 1.8.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Dec 16 2014 Matthias Runge - 1.8.1-1 - update to 1.8.1 * Wed Aug 13 2014 Matthias Runge - 1.7.1-3 - Fix ConfigError: ConfigError: substitution key 'posargs' not found (rhbz#1127961, rhbz#1128562) * Wed Jul 30 2014 Matthias Runge - 1.7.1-2 - require virtualenv >= 1.11.2 (rhbz#1122603) * Tue Jul 08 2014 Matthias Runge - 1.7.1-1 - update to 1.7.1 (rhbz#111797) * Sat Jun 07 2014 Fedora Release Engineering - 1.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Tue Sep 24 2013 Matthias Runge - 1.6.1-1 - update to 1.6.1 * Sun Aug 04 2013 Fedora Release Engineering - 1.4.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 1.4.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Wed Nov 14 2012 Matthias Runge - 1.4.2-7 - add requires python-py, python-virtualenv (rhbz#876246) * Thu Oct 18 2012 Matthias Runge - 1.4.2-6 - change license to GPLv2+ and MIT * Tue Oct 16 2012 Matthias Runge - 1.4.2-5 - totally disable python3 support for now * Fri Oct 12 2012 Matthias Runge - 1.4.2-4 - conditionalize checks, as internet connection required, not available on koji * Thu Oct 11 2012 Matthias Runge - 1.4.2-3 - buildrequirement: virtualenv - disable python3-tests because of missing build-requirement python3-virtualenv * Wed Oct 10 2012 Matthias Runge - 1.4.2-2 - include tests * Tue Oct 09 2012 Matthias Runge - 1.4.2-1 - initial packaging