%define modname nose Summary: A discovery-based unittest extension for Python Summary(ja): Python 用の発見型ユニットテスト・エクステンション Name: python-nose Version: 1.3.7 Release: 2%{?_dist_release} Group: programming Vendor: Project Vine Distribution: Vine Linux License: LGPLv2 URL: http://somethingaboutorange.com/mrl/projects/nose/ Source0: http://somethingaboutorange.com/mrl/projects/nose/nose-%{version}.tar.gz # Make compatible with coverage 4.1 # https://github.com/nose-devs/nose/pull/1004 Patch0: python-nose-coverage4.patch # Fix python 3.5 compat # https://github.com/nose-devs/nose/pull/983 Patch1: python-nose-py35.patch # Fix UnicodeDecodeError with captured output # https://github.com/nose-devs/nose/pull/988 Patch2: python-nose-unicode.patch # Allow docutils to read utf-8 source Patch3: python-nose-readunicode.patch # Fix Python 3.6 compatibility # Python now returns ModuleNotFoundError instead of the previous ImportError # https://github.com/nose-devs/nose/pull/1029 Patch4: python-nose-py36.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: dos2unix BuildRequires: python-rpm-macros BuildRequires: python-devel, python-setuptools, python2-rpm-macros BuildRequires: python3-devel, python3-setuptools, python3-rpm-macros Requires: python-setuptools %description nose: a discovery-based unittest extension. nose provides an alternate test discovery and running process for unittest, one that is intended to mimic the behavior of py.test as much as is reasonably possible without resorting to too much magic. %package -n python3-nose Summary: A discovery-based unittest extension for Python Summary(ja): Python 用の発見型ユニットテスト・エクステンション Group: programming Requires: python3-setuptools %description -n python3-nose nose: a discovery-based unittest extension. nose provides an alternate test discovery and running process for unittest, one that is intended to mimic the behavior of py.test as much as is reasonably possible without resorting to too much magic. %prep %setup -qc pushd %{modname}-%{version} %autopatch -p1 dos2unix examples/attrib_plugin.py cp -pr lgpl.txt AUTHORS CHANGELOG examples NEWS README.txt .. popd mv %{modname}-%{version} python2 cp -pr python2 python3 %build pushd python2 %py2_build popd pushd python3 %py3_build popd %install rm -rf ${RPM_BUILD_ROOT} mkdir -p %{buildroot}%{_mandir}/man1 pushd python2 %py2_install mv %{buildroot}%{_bindir}/nosetests{,-%{python_version}} ln -sf nosetests-%{python_version} %{buildroot}%{_bindir}/nosetests-2 mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python_version}.1 ln -sf nosetests-%{python_version}.1 %{buildroot}%{_mandir}/man1/nosetests-2.1 popd pushd python3 %py3_install mv %{buildroot}%{_bindir}/nosetests{,-%{python3_version}} ln -sf nosetests-%{python3_version} %{buildroot}%{_bindir}/nosetests-3 mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python3_version}.1 ln -sf nosetests-%{python3_version}.1 %{buildroot}%{_mandir}/man1/nosetests-3.1 popd ln -sf nosetests-3 %{buildroot}%{_bindir}/nosetests ln -sf nosetests-3.1 %{buildroot}%{_mandir}/man1/nosetests.1 %check pushd python2 %{__python2} selftest.py popd pushd python3 %{__python3} setup.py build_tests %{__python3} selftest.py popd %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt %{_bindir}/nosetests-2* %{_mandir}/man1/nosetests-2* %{python_sitelib}/nose-%{version}-py%{pyver}.egg-info %{python_sitelib}/nose %files -n python3-nose %defattr(-,root,root,-) %doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt %{_bindir}/nosetests %{_bindir}/nosetests-3* %{_mandir}/man1/nosetests.1* %{_mandir}/man1/nosetests-3* %{python3_sitelib}/nose-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/nose %changelog * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO 1.3.7-2 - built with python-3.8. * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO 1.3.7-1 - new upstream release. - added python3 support. * Sun Apr 28 2013 Toshiharu Kudoh 1.3.0-1 - new upstream release - deleted Patch0 * Sun Jun 24 2012 Toshiharu Kudoh 1.1.2-1 - new upstream release - added Patch0 from Debian sid to delete google analytics * Sat Feb 18 2012 Yoji TOYODA 0.10.4-3 - rebuild with python-2.7.2 * Tue Feb 02 2010 Shu KONNO 0.10.4-2 - rebuild with python-2.6 * Sat Dec 20 2008 Kazutaka HARADA 0.10.4-1 - initial build for Vine Linux based on fedora package * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.10.4-1 - Update to 0.10.4 to fix 2.6 issues * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.10.3-2 - Rebuild for Python 2.6 * Sat Aug 02 2008 Luke Macken 0.10.3-1 - Update to 0.10.3 * Thu Feb 28 2008 Luke Macken 0.10.1-1 - Update to 0.10.1 * Mon Dec 3 2007 Luke Macken 0.10.0-2 - Add python-setuptools to Requires (Bug #408491) * Tue Nov 27 2007 Luke Macken 0.10.0-1 - 0.10.0 * Sun Sep 2 2007 Luke Macken 0.10.0-0.3.b1 - Update for python-setuptools changes in rawhide * Tue Aug 21 2007 Luke Macken 0.10.0-0.2.b1 - 0.10.0b1 - Update license tag to LGPLv2 * Wed Jun 20 2007 Luke Macken 0.10.0-0.1.a2 - 0.10.0a2 * Sat Jun 2 2007 Luke Macken 0.9.3-1 - Latest upstream release - Remove python-nose-0.9.2-mandir.patch * Sat Mar 3 2007 Luke Macken 0.9.2-1 - Add nosetests(1) manpage, and python-nose-0.9.2-mandir.patch to put it in the correct location. - 0.9.2 * Sat Dec 9 2006 Luke Macken 0.9.1-2 - Rebuild for python 2.5 * Fri Nov 24 2006 Luke Macken 0.9.1-1 - 0.9.1 * Fri Sep 8 2006 Luke Macken 0.9.0-1 - 0.9.0 * Wed Apr 19 2006 Ignacio Vazquez-Abrams 0.8.7.2-1 - Initial RPM release