psss / rpms / python-tox

Forked from rpms/python-tox 4 years ago
Clone
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
3137e7c
Version:        1.4.2
4dd102a
Release:        7%{?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
3137e7c
Source0:        http://pypi.python.org/packages/source/t/%{pypiname}/%{pypiname}-%{version}.zip
3137e7c
#md5=dc52acf22eb57eaa33e704f8a54e7b34
3137e7c
3137e7c
BuildArch:      noarch
3137e7c
BuildRequires:  python2-devel
3137e7c
BuildRequires:  python-setuptools
4dd102a
Requires:  python-py
4dd102a
Requires:  python-virtualenv
3137e7c
# required for check
3137e7c
%if 0%{?fedora}
3137e7c
BuildRequires:  python-py
3137e7c
BuildRequires:  pytest
3137e7c
BuildRequires:  python-virtualenv
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
3137e7c
%prep 
3137e7c
%setup -q -n %{pypiname}-%{version}
3137e7c
3137e7c
%build
3137e7c
%{__python} setup.py build
3137e7c
3137e7c
%install
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
3137e7c
%if 0%{?fedora}==17 || 0%{?fedora}==18
3137e7c
TOXENV=py27 %{__python} setup.py test
3137e7c
%endif
3137e7c
3137e7c
%endif
3137e7c
 
3137e7c
%files
3137e7c
%doc LICENSE README.txt ISSUES.txt doc
3137e7c
%{_bindir}/%{pypiname}
3137e7c
%{python_sitelib}/%{pypiname}
3137e7c
%{python_sitelib}/%{pypiname}-%{version}-py2.?.egg-info
3137e7c
3137e7c
3137e7c
%changelog
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