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.5
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
# https://github.com/erikrose/nose-progressive/pull/58
Patch0:         0001-read-README.rst-as-UTF-8.patch
BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-nose >= 1.2.1
BuildRequires:  python-blessings
%if %{with python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-nose >= 1.2.1
BuildRequires:  python3-blessings
%endif
Requires:       python-nose >= 1.2.1
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 >= 1.2.1
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}
%patch0 -p1
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
%if %{with python3}
pushd %{py3dir}
nosetests-3.3 build/lib
popd
%endif

%{__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
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Mon Apr 29 2013 Dan Callaghan <dcallagh@redhat.com> - 1.5-2
- fix tests

* Mon Apr 29 2013 Dan Callaghan <dcallagh@redhat.com> - 1.5-1
- new upstream bug fix release 1.5

* Wed Mar 27 2013 Dan Callaghan <dcallagh@redhat.com> - 1.4.1-1
- new upstream bug fix release 1.4.1

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Jan 21 2013 Dan Callaghan <dcallagh@redhat.com> - 1.4-1
- new upstream release 1.4

* 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