94d0aa
%global modname nose
94d0aa
94d0aa
# Enable building without docs to avoid a circular dependency between this and python-sphinx
94d0aa
%bcond_with docs
94d0aa
94d0aa
%global desc nose extends the test loading and running features of unit test, making\
94d0aa
it easier to write, find and run tests.\
94d0aa
\
94d0aa
By default, nose will run tests in files or directories under the\
94d0aa
current working directory whose names include "test" or "Test" at a\
94d0aa
word boundary (like "test_this" or "functional_test" or "TestClass"\
94d0aa
but not "libtest"). Test output is similar to that of unit test, but\
94d0aa
also includes captured stdout output from failing tests, for easy\
94d0aa
print-style debugging.\
94d0aa
\
94d0aa
These features, and many more, are customizable through the use of\
94d0aa
plugins. Plugins included with nose provide support for doctest, code\
94d0aa
coverage and profiling, flexible attribute-based test selection,\
94d0aa
output capture and more.\
94d0aa
94d0aa
94d0aa
Name:           python-%{modname}
94d0aa
Version:        1.3.7
94d0aa
Release:        23%{?dist}
94d0aa
BuildArch:      noarch
94d0aa
94d0aa
License:        LGPLv2+ and Public Domain
94d0aa
Summary:        Discovery-based unit test extension for Python
94d0aa
URL:            https://nose.readthedocs.org/en/latest/
94d0aa
Source0:        http://pypi.python.org/packages/source/n/nose/nose-%{version}.tar.gz
94d0aa
# Make compatible with coverage 4.1
94d0aa
# https://github.com/nose-devs/nose/pull/1004
94d0aa
Patch0:         python-nose-coverage4.patch
94d0aa
# Fix python 3.5 compat
94d0aa
# https://github.com/nose-devs/nose/pull/983
94d0aa
Patch1:         python-nose-py35.patch
94d0aa
# Fix UnicodeDecodeError with captured output
94d0aa
# https://github.com/nose-devs/nose/pull/988
94d0aa
Patch2:         python-nose-unicode.patch
94d0aa
# Allow docutils to read utf-8 source
94d0aa
Patch3:         python-nose-readunicode.patch
94d0aa
# Fix Python 3.6 compatibility
94d0aa
# Python now returns ModuleNotFoundError instead of the previous ImportError
94d0aa
# https://github.com/nose-devs/nose/pull/1029
94d0aa
Patch4:         python-nose-py36.patch
94d0aa
94d0aa
BuildRequires:  dos2unix
94d0aa
94d0aa
%description
94d0aa
%{desc}
94d0aa
94d0aa
%package docs
94d0aa
Summary:        Nose Documentation
94d0aa
%if %{with docs}
94d0aa
BuildRequires:  %{_bindir}/sphinx-build
94d0aa
%endif
94d0aa
94d0aa
%description docs
94d0aa
Documentation for Nose.
94d0aa
94d0aa
%package -n python2-%{modname}
94d0aa
Summary:        %{summary}
94d0aa
BuildRequires:  python2-devel
94d0aa
BuildRequires:  python2-setuptools
94d0aa
Requires:       python2-setuptools
94d0aa
%{?python_provide:%python_provide python2-%{modname}}
94d0aa
94d0aa
%description -n python2-%{modname}
94d0aa
%{desc}
94d0aa
94d0aa
%package -n python3-%{modname}
94d0aa
Summary:        %{summary}
94d0aa
BuildRequires:  python3-devel
94d0aa
BuildRequires:  python3-setuptools
94d0aa
BuildRequires:  python3-coverage >= 3.4-1
94d0aa
%if 0%{?rhel} && 0%{?rhel} >= 8
94d0aa
Requires:       platform-python-setuptools
94d0aa
%else
94d0aa
Requires:       python3-setuptools
94d0aa
%endif
94d0aa
%{?python_provide:%python_provide python3-%{modname}}
94d0aa
Obsoletes:      platform-python-%{modname} < %{version}-%{release}
94d0aa
94d0aa
%description -n python3-%{modname}
94d0aa
%{desc}
94d0aa
94d0aa
This package installs the nose module and nosetests3 program that can discover
94d0aa
python3 unit tests.
94d0aa
94d0aa
%prep
94d0aa
%setup -qc
94d0aa
pushd %{modname}-%{version}
94d0aa
%autopatch -p1
94d0aa
dos2unix examples/attrib_plugin.py
94d0aa
cp -pr lgpl.txt AUTHORS CHANGELOG examples NEWS README.txt ..
94d0aa
popd
94d0aa
mv %{modname}-%{version} python2
94d0aa
cp -pr python2 python3
94d0aa
94d0aa
%build
94d0aa
pushd python2
94d0aa
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
94d0aa
%py2_build
94d0aa
popd
94d0aa
pushd python3
94d0aa
%py3_build
94d0aa
popd
94d0aa
94d0aa
%install
94d0aa
mkdir -p %{buildroot}%{_mandir}/man1
94d0aa
pushd python2
94d0aa
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
94d0aa
%py2_install
94d0aa
mv %{buildroot}%{_bindir}/nosetests{,-%{python2_version}}
94d0aa
ln -sf nosetests-%{python2_version} %{buildroot}%{_bindir}/nosetests-2
94d0aa
mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python2_version}.1
94d0aa
ln -sf nosetests-%{python2_version}.1 %{buildroot}%{_mandir}/man1/nosetests-2.1
94d0aa
popd
94d0aa
pushd python3
94d0aa
%py3_install
94d0aa
mv %{buildroot}%{_bindir}/nosetests{,-%{python3_version}}
94d0aa
ln -sf nosetests-%{python3_version} %{buildroot}%{_bindir}/nosetests-3
94d0aa
mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python3_version}.1
94d0aa
ln -sf nosetests-%{python3_version}.1 %{buildroot}%{_mandir}/man1/nosetests-3.1
94d0aa
popd
94d0aa
94d0aa
ln -sf nosetests-2 %{buildroot}%{_bindir}/nosetests
94d0aa
ln -sf nosetests-2.1 %{buildroot}%{_mandir}/man1/nosetests.1
94d0aa
94d0aa
%if %{with docs}
94d0aa
pushd python2/doc
94d0aa
  sphinx-build -b html -d .build/doctrees . .build/html
94d0aa
  rm -vrf .build/html/.buildinfo .build/html/_sources
94d0aa
  mv .build/html ../..
94d0aa
  rm -vrf .build
94d0aa
popd
94d0aa
%endif
94d0aa
cp -a python2/doc reST
94d0aa
rm -vrf reST/{.static,.templates}
94d0aa
94d0aa
%check
94d0aa
pushd python2
94d0aa
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
94d0aa
%{__python2} selftest.py
94d0aa
popd
94d0aa
pushd python3
94d0aa
%{__python3} setup.py build_tests
94d0aa
%{__python3} selftest.py
94d0aa
popd
94d0aa
94d0aa
%files -n python2-%{modname}
94d0aa
%license lgpl.txt
94d0aa
%{_bindir}/nosetests
94d0aa
%{_bindir}/nosetests-2
94d0aa
%{_bindir}/nosetests-%{python2_version}
94d0aa
%{_mandir}/man1/nosetests.1*
94d0aa
%{_mandir}/man1/nosetests-2.1*
94d0aa
%{_mandir}/man1/nosetests-%{python2_version}.1*
94d0aa
%{python2_sitelib}/nose-*.egg-info/
94d0aa
%{python2_sitelib}/nose/
94d0aa
94d0aa
%files -n python3-%{modname}
94d0aa
%license lgpl.txt
94d0aa
%exclude %{_bindir}/nosetests-3
94d0aa
%{_bindir}/nosetests-%{python3_version}
94d0aa
%exclude %{_mandir}/man1/nosetests-3.1*
94d0aa
%{_mandir}/man1/nosetests-%{python3_version}.1*
94d0aa
%{python3_sitelib}/nose-*.egg-info/
94d0aa
%{python3_sitelib}/nose/
94d0aa
94d0aa
%files docs
94d0aa
%license lgpl.txt
94d0aa
%doc AUTHORS CHANGELOG examples NEWS README.txt reST
94d0aa
%if %{with docs}
94d0aa
%doc html
94d0aa
%endif
94d0aa
94d0aa
%changelog
94d0aa
* Wed Nov 28 2018 Lumír Balhar <lbalhar@redhat.com> - 1.3.7-23
94d0aa
- Require platform-python-setuptools instead of python3-setuptools
94d0aa
- Resolves: rhbz#1654302
94d0aa
94d0aa
* Mon Aug 06 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.7-22
94d0aa
- Remove unversioned executables (only *-3.6 should be provided)
94d0aa
94d0aa
* Mon Jul 09 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.7-21
94d0aa
- Remove dependency on python2-coverage
94d0aa
  https://bugzilla.redhat.com/show_bug.cgi?id=1595193
94d0aa
94d0aa
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.7-20
94d0aa
- Allow Python 2 for build
94d0aa
  see https://hurl.corp.redhat.com/rhel8-py2
94d0aa
- Build without docs to fix FTBFS
94d0aa
94d0aa
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.7-19
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
94d0aa
94d0aa
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.7-18
94d0aa
- Use better Obsoletes for platform-python
94d0aa
94d0aa
* Sat Nov 04 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.7-17
94d0aa
- Remove platform-python subpackage
94d0aa
- Cleanup spec
94d0aa
94d0aa
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 1.3.7-16
94d0aa
- Cleanup spec file conditionals
94d0aa
94d0aa
* Thu Aug 10 2017 Miro Hrončok <mhroncok@redhat.com> - 1.3.7-15
94d0aa
- Add platform-python subpackage
94d0aa
94d0aa
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.7-14
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
94d0aa
94d0aa
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.7-13
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
94d0aa
94d0aa
* Mon Dec 12 2016 Tomas Orsava <torsava@redhat.com> - 1.3.7-12
94d0aa
- Patched to fix compatibility with Python 3.6
94d0aa
94d0aa
* Mon Dec 05 2016 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.3.7-11
94d0aa
- Provide nosetests-3 (#1289820).
94d0aa
- Rename python-nose to python2-nose and use Python provides macro.
94d0aa
- Include the license with the -docs subpackage.
94d0aa
- Use symlinks to provide man pages for all the Python version variants of /usr/bin/nosetests.
94d0aa
- The -docs subpackage no longer requires python-nose since that doesn't make sense.
94d0aa
94d0aa
* Tue Nov 15 2016 Orion Poplawski <orion@cora.nwra.com> 1.3.7-10
94d0aa
- Add upstream patch to fix python 3.5 compat
94d0aa
- Add patch to allow docutils to read unicode source
94d0aa
- Update spec
94d0aa
94d0aa
* Wed Nov 9 2016 Orion Poplawski <orion@cora.nwra.com> 1.3.7-9
94d0aa
- Add patch to fix build with coverage 4.1
94d0aa
94d0aa
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.7-8
94d0aa
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
94d0aa
94d0aa
* Tue Feb 2 2016 Orion Poplawski <orion@cora.nwra.com> 1.3.7-7
94d0aa
- Fix URL
94d0aa
94d0aa
* Thu Sep 24 2015 Robert Kuska <rkuska@redhat.com> 1.3.7-6
94d0aa
- Rebuilt for Python3.5 rebuild with disabled tests under python3
94d0aa
94d0aa
* Sun Aug 09 2015 Kevin Fenzi <kevin@scrye.com> 1.3.7-5
94d0aa
- Add conditional for python-sphinx buildrequires when with_docs is not set. 
94d0aa
- Fixes bug #1251700
94d0aa
94d0aa
* Fri Jul 24 2015 Kevin Fenzi <kevin@scrye.com> 1.3.7-4
94d0aa
- Version provides correctly for python2-nose.
94d0aa
94d0aa
* Fri Jul 17 2015 Kevin Fenzi <kevin@scrye.com> 1.3.7-3
94d0aa
- Add provides for python2-nose. Fixes bug #1241670
94d0aa
94d0aa
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.7-2
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
94d0aa
94d0aa
* Wed Jun 03 2015 Kevin Fenzi <kevin@scrye.com> 1.3.7-1
94d0aa
- Update to 1.3.7 (#1227345)
94d0aa
94d0aa
* Sat Apr 04 2015 Ralph Bean <rbean@redhat.com> - 1.3.6-1
94d0aa
- new version
94d0aa
94d0aa
* Wed Aug 27 2014 Luke Macken <lmacken@redhat.com> - 1.3.4-1
94d0aa
- Update to 1.3.4 (#1094718)
94d0aa
94d0aa
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-3
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
94d0aa
94d0aa
* Mon May 19 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.3.2-2
94d0aa
- Add patch for issue https://github.com/nose-devs/nose/pull/811,
94d0aa
which makes tests of python-billiard and python-falcon fail with Python 3.4
94d0aa
94d0aa
* Sat May 03 2014 Orion Poplawski <orion@cora.nwra.com> - 1.3.2-1
94d0aa
- Update to 1.3.2 for Python 3.4 suport
94d0aa
94d0aa
* Fri May 02 2014 Orion Poplawski <orion@cora.nwra.com> - 1.3.1-2
94d0aa
- Rebuild for Python 3.4
94d0aa
94d0aa
* Fri Mar 14 2014 Luke Macken <lmacken@redhat.com> - 1.3.1-1
94d0aa
- Update to 1.3.1 (#1074971)
94d0aa
94d0aa
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-2
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
94d0aa
94d0aa
* Tue Apr  9 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3.0-1
94d0aa
- Update to 1.3.0 upstream with python-3.3 fixes
94d0aa
94d0aa
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
94d0aa
94d0aa
* Wed Sep 12 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 1.2.1-1
94d0aa
- New upsream 1.2.1 that just bumps the version properly
94d0aa
94d0aa
* Mon Sep 10 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 1.2.0-1
94d0aa
- Update to nose-1.2.0.
94d0aa
- Two less python3 test failures than 1.1.2
94d0aa
94d0aa
* Sat Aug  4 2012 David Malcolm <dmalcolm@redhat.com> - 1.1.2-5
94d0aa
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
94d0aa
- disable selftests that fail under 3.3
94d0aa
94d0aa
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 1.1.2-4
94d0aa
- remove rhel logic from with_python3 conditional
94d0aa
94d0aa
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-3
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
94d0aa
94d0aa
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-2
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
94d0aa
94d0aa
* Mon Aug 1 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.1.2-1
94d0aa
- Upstream bugfix release
94d0aa
94d0aa
* Wed Jul 27 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.1.1-1
94d0aa
- Upstream bugfix release
94d0aa
94d0aa
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
94d0aa
94d0aa
* Sun Dec 26 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0.0-1
94d0aa
- Update to 1.0.0
94d0aa
- Create the docs subpackage for text docs even if we don't create the html docs.
94d0aa
- Make python3 subpackage
94d0aa
94d0aa
* Tue Dec 7 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.11.4-2
94d0aa
- Fix FTBFS with newer coverage
94d0aa
94d0aa
* Thu Oct 21 2010 Luke Macken <lmacken@redhat.com> - 0.11.4-1
94d0aa
- Update to 0.11.4 (#3630722)
94d0aa
94d0aa
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.11.3-5
94d0aa
- add support for building without docs, to avoid a circular build-time
94d0aa
dependency between this and python-sphinx; disable docs subpackage for now
94d0aa
- add (apparently) missing BR on python-coverage (appears to be needed
94d0aa
for %%check)
94d0aa
- cherrypick upstream compatibility fixes for 2.7
94d0aa
94d0aa
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.11.3-4
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
94d0aa
94d0aa
* Thu May 20 2010 Luke Macken <lmacken@redhat.com> - 0.11.3-3
94d0aa
- Update URL to http://code.google.com/p/python-nose/
94d0aa
- Align description to reflect that in setup.py
94d0aa
- Create a docs subpackage containing HTML & reST documentation
94d0aa
- Thanks to Gareth Armstrong at HP for the patch
94d0aa
94d0aa
* Thu May 06 2010 Luke Macken <lmacken@redhat.com> - 0.11.3-2
94d0aa
- Don't hardcode the python version
94d0aa
94d0aa
* Thu May 06 2010 Luke Macken <lmacken@redhat.com> - 0.11.3-1
94d0aa
- Update to 0.11.3
94d0aa
- Enable the self tests
94d0aa
94d0aa
* Mon Oct 05 2009 Luke Macken <lmacken@redhat.com> - 0.11.1-2
94d0aa
- Include the new nosetests-2.6 script as well
94d0aa
94d0aa
* Mon Oct 05 2009 Luke Macken <lmacken@redhat.com> - 0.11.1-1
94d0aa
- Update to 0.11.1
94d0aa
94d0aa
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.4-3
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
94d0aa
94d0aa
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.4-2
94d0aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
94d0aa
94d0aa
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.4-1
94d0aa
- Update to 0.10.4 to fix 2.6 issues
94d0aa
94d0aa
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.3-2
94d0aa
- Rebuild for Python 2.6
94d0aa
94d0aa
* Sat Aug 02 2008 Luke Macken <lmacken@redhat.com> 0.10.3-1
94d0aa
- Update to 0.10.3
94d0aa
94d0aa
* Thu Feb 28 2008 Luke Macken <lmacken@redhat.com> 0.10.1-1
94d0aa
- Update to 0.10.1
94d0aa
94d0aa
* Mon Dec  3 2007 Luke Macken <lmacken@redhat.com> 0.10.0-2
94d0aa
- Add python-setuptools to Requires (Bug #408491)
94d0aa
94d0aa
* Tue Nov 27 2007 Luke Macken <lmacken@redhat.com> 0.10.0-1
94d0aa
- 0.10.0
94d0aa
94d0aa
* Sun Sep  2 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.3.b1
94d0aa
- Update for python-setuptools changes in rawhide
94d0aa
94d0aa
* Tue Aug 21 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.2.b1
94d0aa
- 0.10.0b1
94d0aa
- Update license tag to LGPLv2
94d0aa
94d0aa
* Wed Jun 20 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.1.a2
94d0aa
- 0.10.0a2
94d0aa
94d0aa
* Sat Jun  2 2007 Luke Macken <lmacken@redhat.com> 0.9.3-1
94d0aa
- Latest upstream release
94d0aa
- Remove python-nose-0.9.2-mandir.patch
94d0aa
94d0aa
* Sat Mar  3 2007 Luke Macken <lmacken@redhat.com> 0.9.2-1
94d0aa
- Add nosetests(1) manpage, and python-nose-0.9.2-mandir.patch to put it in
94d0aa
  the correct location.
94d0aa
- 0.9.2
94d0aa
94d0aa
* Sat Dec  9 2006 Luke Macken <lmacken@redhat.com> 0.9.1-2
94d0aa
- Rebuild for python 2.5
94d0aa
94d0aa
* Fri Nov 24 2006 Luke Macken <lmacken@redhat.com> 0.9.1-1
94d0aa
- 0.9.1
94d0aa
94d0aa
* Fri Sep  8 2006 Luke Macken <lmacken@redhat.com> 0.9.0-1
94d0aa
- 0.9.0
94d0aa
94d0aa
* Wed Apr 19 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.8.7.2-1
94d0aa
- Initial RPM release