salimma / rpms / python-tox

Forked from rpms/python-tox 4 years ago
Clone
b16e8f3
%if 0%{?fedora} > 12
39de635
# virtualenv for python3 is missing
b16e8f3
%global with_python3 0
b16e8f3
%endif
b16e8f3
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
3137e7c
Name:           python-tox
39de635
Version:        1.7.1
6683010
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
3137e7c
URL:            http://codespeak.net/tox
b16e8f3
Source0:        http://pypi.python.org/packages/source/t/%{pypiname}/%{pypiname}-%{version}.tar.gz
3137e7c
6683010
Patch0:         python-tox-Fix-command-expansion-and-parsing.patch
6683010
3137e7c
BuildArch:      noarch
3137e7c
BuildRequires:  python2-devel
3137e7c
BuildRequires:  python-setuptools
4dd102a
Requires:  python-py
06bc480
Requires:  python-virtualenv >= 1.11.2
3137e7c
# required for check
3137e7c
%if 0%{?fedora}
3137e7c
BuildRequires:  python-py
3137e7c
BuildRequires:  pytest
06bc480
BuildRequires:  python-virtualenv >= 1.11.2
3137e7c
%endif
3137e7c
3137e7c
%description
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
b16e8f3
%if 0%{?with_python3}
b16e8f3
%package -n python3-%{pypiname}
b16e8f3
Summary:        Virtualenv-based automation of test activities
b16e8f3
Requires:       python3-py
b16e8f3
Requires:       python3-virtualenv
b16e8f3
BuildRequires:  python3-py
b16e8f3
BuildRequires:  python3-pytest
b16e8f3
BuildRequires:  python3-virtualenv
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
%endif
b16e8f3
3137e7c
%prep 
3137e7c
%setup -q -n %{pypiname}-%{version}
6683010
%patch0 -p1
6683010
b16e8f3
%if 0%{?with_python3}
39de635
rm -rf %{py3dir}
b16e8f3
cp -a . %{py3dir}
b16e8f3
%endif
b16e8f3
3137e7c
3137e7c
%build
3137e7c
%{__python} setup.py build
3137e7c
b16e8f3
%if 0%{?with_python3}
b16e8f3
pushd %{py3dir}
b16e8f3
%{__python3} setup.py build
b16e8f3
popd
b16e8f3
%endif # with_python3
b16e8f3
b16e8f3
3137e7c
%install
b16e8f3
%if 0%{?with_python3}
b16e8f3
pushd %{py3dir}
b16e8f3
%{__python3} setup.py install --skip-build --root %{buildroot}
b16e8f3
mv %{buildroot}%{_bindir}/tox %{buildroot}%{_bindir}/python3-tox
b16e8f3
mv %{buildroot}%{_bindir}/tox-quickstart %{buildroot}%{_bindir}/python3-tox-quickstart
b16e8f3
popd
b16e8f3
%endif # with_python3
b16e8f3
3137e7c
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
3137e7c
3137e7c
# if internet connection available, run tests
3137e7c
%if %{with internet}
3137e7c
%check
3137e7c
# python 2.7: fedora 17, fedora 18
3137e7c
# python 3.2: fedora 17
3137e7c
# python 3.3: fedora 18
3137e7c
3137e7c
# el6: buildrequirements missing
3137e7c
#%if 0%{?rhel}==6
3137e7c
#TOXENV=py26 %{__python} setup.py test
3137e7c
#%endif
3137e7c
b16e8f3
%if 0%{?fedora}>=17 
3137e7c
TOXENV=py27 %{__python} setup.py test
3137e7c
%endif
3137e7c
3137e7c
%endif
3137e7c
 
3137e7c
%files
b16e8f3
%doc LICENSE ISSUES.txt doc
3137e7c
%{_bindir}/%{pypiname}
b16e8f3
%{_bindir}/%{pypiname}-quickstart
3137e7c
%{python_sitelib}/%{pypiname}
3137e7c
%{python_sitelib}/%{pypiname}-%{version}-py2.?.egg-info
3137e7c
3137e7c
3137e7c
%changelog
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