3137e7c
# Tests requiring Internet connections are disabled by default
3137e7c
# pass --with internet to run them (e.g. when doing a local rebuild
3137e7c
# for sanity checks before committing)
3137e7c
%bcond_with internet
3137e7c
3137e7c
3137e7c
%global pypiname tox
1fd92e9
Name:           python-%{pypiname}
99c28ef
Version:        2.3.1
1fd92e9
Release:        3%{?dist}
3137e7c
Summary:        Virtualenv-based automation of test activities
3137e7c
3137e7c
# file toxbootstrap.py is licensed under MIT License
3137e7c
License:        GPLv2+ and MIT
1fd92e9
URL:            http://tox.testrun.org/
1fd92e9
Source0:        https://files.pythonhosted.org/packages/source/t/%{pypiname}/%{pypiname}-%{version}.tar.gz
1fd92e9
BuildArch:      noarch
3137e7c
1fd92e9
%description
1fd92e9
Tox as is a generic virtualenv management and test command line tool you 
1fd92e9
can use for:
6683010
1fd92e9
 - checking your package installs correctly with different Python versions 
1fd92e9
   and interpreters
1fd92e9
 - running your tests in each of the environments, configuring your test tool 
1fd92e9
   of choice
1fd92e9
 - acting as a frontend to Continuous Integration servers, greatly reducing 
1fd92e9
   boilerplate and merging CI and shell-based testing.
1fd92e9
1fd92e9
%package -n     python2-%{pypiname}
1fd92e9
Summary:        %{summary}
1fd92e9
%{?python_provide:%python_provide python2-%{pypiname}}
3137e7c
BuildRequires:  python2-devel
1fd92e9
BuildRequires:  python2-setuptools
1fd92e9
Requires:  python2-py
1fd92e9
Requires:  python2-virtualenv >= 1.11.2
79129af
Requires:  python-pluggy
1fd92e9
1fd92e9
%if %{with internet}
1fd92e9
# for tests
1fd92e9
BuildRequires:  python2-py
1fd92e9
BuildRequires:  python2-pytest
1fd92e9
BuildRequires:  python2-virtualenv >= 1.11.2
3137e7c
%endif
3137e7c
1fd92e9
%description -n python2-%{pypiname}
3137e7c
Tox as is a generic virtualenv management and test command line tool you 
3137e7c
can use for:
3137e7c
3137e7c
 - checking your package installs correctly with different Python versions 
3137e7c
   and interpreters
3137e7c
 - running your tests in each of the environments, configuring your test tool 
3137e7c
   of choice
3137e7c
 - acting as a frontend to Continuous Integration servers, greatly reducing 
3137e7c
   boilerplate and merging CI and shell-based testing.
3137e7c
1fd92e9
This package contains just the module you can import from Python 2,
1fd92e9
for the actual command line utility, dnf install tox.
1fd92e9
b16e8f3
%package -n python3-%{pypiname}
1fd92e9
Summary:        %{summary}
1fd92e9
%{?python_provide:%python_provide python3-%{pypiname}}
1fd92e9
Provides:       %{pypiname} = %{version}-%{release}
1fd92e9
BuildRequires:  python3-devel
1fd92e9
BuildRequires:  python3-setuptools
b16e8f3
Requires:       python3-py
79129af
Requires:       python3-pluggy
b16e8f3
Requires:       python3-virtualenv
1fd92e9
1fd92e9
%if %{with internet}
1fd92e9
# for tests
b16e8f3
BuildRequires:  python3-py
b16e8f3
BuildRequires:  python3-pytest
b16e8f3
BuildRequires:  python3-virtualenv
1fd92e9
%endif
b16e8f3
b16e8f3
%description -n python3-%{pypiname}
b16e8f3
Tox as is a generic virtualenv management and test command line tool you 
b16e8f3
can use for:
b16e8f3
b16e8f3
 - checking your package installs correctly with different Python versions 
b16e8f3
   and interpreters
b16e8f3
 - running your tests in each of the environments, configuring your test tool 
b16e8f3
   of choice
b16e8f3
 - acting as a frontend to Continuous Integration servers, greatly reducing 
b16e8f3
   boilerplate and merging CI and shell-based testing.
b16e8f3
795f3eb
%prep
3137e7c
%setup -q -n %{pypiname}-%{version}
795f3eb
795f3eb
# remove bundled egg-info
795f3eb
rm -rf %{pypiname}.egg-info
6683010
3137e7c
%build
1fd92e9
%py2_build
1fd92e9
%py3_build
b16e8f3
b16e8f3
3137e7c
%install
1fd92e9
%py2_install
1fd92e9
rm %{buildroot}%{_bindir}/%{pypiname}*
b16e8f3
1fd92e9
%py3_install
3137e7c
3137e7c
# if internet connection available, run tests
3137e7c
%if %{with internet}
3137e7c
%check
1fd92e9
TOXENV=py27 %{__python2} setup.py test
1fd92e9
TOXENV=py%{python3_version_nodots} %{__python3} setup.py test
3137e7c
%endif
b42ab61
1fd92e9
%files -n python2-%{pypiname}
b42ab61
%doc ISSUES.txt doc
b42ab61
%license LICENSE
1fd92e9
%{python2_sitelib}/%{pypiname}
1fd92e9
%{python2_sitelib}/%{pypiname}-%{version}-py2.?.egg-info
1fd92e9
1fd92e9
%files -n python3-%{pypiname}
3137e7c
%{_bindir}/%{pypiname}
b16e8f3
%{_bindir}/%{pypiname}-quickstart
b42ab61
%{python3_sitelib}/%{pypiname}
b42ab61
%{python3_sitelib}/%{pypiname}-%{version}-py%{python3_version}.egg-info
3137e7c
3137e7c
%changelog
1fd92e9
* Thu Aug 11 2016 Miro HronĨok <mhroncok@redhat.com> - 2.3.1-3
1fd92e9
- /usr/bin/tox is Python3
1fd92e9
- Python 2 subpackage is python2-tox
1fd92e9
- Run the tests also on Python 3
1fd92e9
- Update Source URL and URL
1fd92e9
- Use modern macros
1fd92e9
- Get rid of Fedora 17 checks
1fd92e9
328c670
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-2
328c670
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
328c670
99c28ef
* Mon Feb 29 2016 Matthias Runge <mrunge@redhat.com> - 2.3.1-1
99c28ef
- update to 2.3.1
99c28ef
e65973a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-4
e65973a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e65973a
1142918
* Thu Nov 12 2015 Kalev Lember <klember@redhat.com> - 2.1.1-3
1142918
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
1142918
79129af
* Tue Aug 25 2015 Matthias Runge <mrunge@redhat.com> - 2.1.1-2
79129af
- add requirement: python-pluggy
79129af
b42ab61
* Tue Aug 18 2015 Matthias Runge <mrunge@redhat.com> - 2.1.1-1
b42ab61
- update to 2.1.1
b42ab61
6e5b288
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.1-2
6e5b288
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6e5b288
795f3eb
* Tue Dec 16 2014 Matthias Runge <mrunge@redhat.com> - 1.8.1-1
795f3eb
- update to 1.8.1
795f3eb
6683010
* Wed Aug 13 2014 Matthias Runge <mrunge@redhat.com> - 1.7.1-3
6683010
- Fix ConfigError: ConfigError: substitution key 'posargs' not found
6683010
  (rhbz#1127961, rhbz#1128562)
6683010
06bc480
* Wed Jul 30 2014 Matthias Runge <mrunge@redhat.com> - 1.7.1-2
06bc480
- require virtualenv >= 1.11.2 (rhbz#1122603)
06bc480
39de635
* Tue Jul 08 2014 Matthias Runge <mrunge@redhat.com> - 1.7.1-1
39de635
- update to 1.7.1 (rhbz#111797)
39de635
ab45d3c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.1-2
ab45d3c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
ab45d3c
b16e8f3
* Tue Sep 24 2013 Matthias Runge <mrunge@redhat.com> - 1.6.1-1
b16e8f3
- update to 1.6.1
b16e8f3
f3cb1e6
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-9
f3cb1e6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f3cb1e6
2fccf8d
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-8
2fccf8d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2fccf8d
4dd102a
* Wed Nov 14 2012 Matthias Runge <mrunge@redhat.com> - 1.4.2-7
4dd102a
- add requires python-py, python-virtualenv (rhbz#876246)
4dd102a
3137e7c
* Thu Oct 18 2012 Matthias Runge <mrunge@redhat.com> - 1.4.2-6
3137e7c
- change license to GPLv2+ and MIT
3137e7c
3137e7c
* Tue Oct 16 2012 Matthias Runge <mrunge@redhat.com> - 1.4.2-5
3137e7c
- totally disable python3 support for now
3137e7c
3137e7c
* Fri Oct 12 2012 Matthias Runge <mrunge@redhat.com> - 1.4.2-4
3137e7c
- conditionalize checks, as internet connection required, not available on koji
3137e7c
3137e7c
* Thu Oct 11 2012 Matthias Runge <mrunge@redhat.com> - 1.4.2-3
3137e7c
- buildrequirement: virtualenv
3137e7c
- disable python3-tests because of missing build-requirement python3-virtualenv
3137e7c
3137e7c
* Wed Oct 10 2012 Matthias Runge <mrunge@redhat.com> - 1.4.2-2
3137e7c
- include tests
3137e7c
3137e7c
* Tue Oct 09 2012 Matthias Runge <mrunge@redhat.com> - 1.4.2-1
3137e7c
- initial packaging