Blob Blame History Raw
%global upstream_name nose-progressive

%if 0%{?fedora} || 0%{?rhel} > 6
%bcond_without python3
%else
%bcond_with python3
%endif

Name:           python-%{upstream_name}
Version:        1.3
Release:        3%{?dist}
Summary:        Nose plugin to show a progress bar and tracebacks during tests
License:        GPLv2+
URL:            https://github.com/erikrose/nose-progressive
Source0:        http://pypi.python.org/packages/source/n/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-nose
%if %{with python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-nose
%endif
Requires:       python-nose
Requires:       python-blessings

%description
nose-progressive is a nose plugin which displays progress in a stationary 
progress bar, freeing the rest of the screen (as well as the scrollback buffer) 
for the compact display of test failures, which it formats beautifully and 
usefully. It displays failures and errors as soon as they occur and avoids 
scrolling them off the screen in favor of less useful output. It also offers 
a number of other human-centric features to speed the debugging process.

%if %{with python3}
%package -n python3-%{upstream_name}
Summary:        Nose plugin to show a progress bar and tracebacks during tests
Requires:       python3-nose
Requires:       python3-blessings

%description -n python3-%{upstream_name}
nose-progressive is a nose plugin which displays progress in a stationary 
progress bar, freeing the rest of the screen (as well as the scrollback buffer) 
for the compact display of test failures, which it formats beautifully and 
usefully. It displays failures and errors as soon as they occur and avoids 
scrolling them off the screen in favor of less useful output. It also offers 
a number of other human-centric features to speed the debugging process.
%endif

%prep
%setup -q -n %{upstream_name}-%{version}
rm -r nose_progressive.egg-info

%if %{with python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif

%build
%{__python} setup.py build

%if %{with python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif

%install
%if %{with python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif

%{__python} setup.py install --skip-build --root %{buildroot}

%check
# Tests fail due to differing escape sequences... terminfo???
#%%{__python} setup.py nosetests

%files
%doc README.rst
%{python_sitelib}/noseprogressive
%{python_sitelib}/nose_progressive*.egg-info

%if %{with python3}
%files -n python3-%{upstream_name}
%doc README.rst
%{python3_sitelib}/noseprogressive
%{python3_sitelib}/nose_progressive*.egg-info
%endif

%changelog
* Tue Dec 04 2012 Dan Callaghan <dcallagh@redhat.com> - 1.3-3
- fix RPM macro in comment

* Mon Dec 03 2012 Dan Callaghan <dcallagh@redhat.com> - 1.3-2
- remove bundled egg-info from upstream tarball

* Fri Nov 30 2012 Dan Callaghan <dcallagh@redhat.com> - 1.3-1
- initial version