python-nose-vl.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. %define modname nose
  2. %define pkg_release 1%{?_dist_release}
  3. Name: python-nose
  4. Version: 1.3.7
  5. Release: %{pkg_release}
  6. Summary: A discovery-based unittest extension for Python
  7. Summary(ja): Python 用の発見型ユニットテスト・エクステンション
  8. Group: Development/Languages
  9. License: LGPLv2
  10. URL: http://somethingaboutorange.com/mrl/projects/nose/
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. Source0: http://somethingaboutorange.com/mrl/projects/nose/nose-%{version}.tar.gz
  14. # Make compatible with coverage 4.1
  15. # https://github.com/nose-devs/nose/pull/1004
  16. Patch0: python-nose-coverage4.patch
  17. # Fix python 3.5 compat
  18. # https://github.com/nose-devs/nose/pull/983
  19. Patch1: python-nose-py35.patch
  20. # Fix UnicodeDecodeError with captured output
  21. # https://github.com/nose-devs/nose/pull/988
  22. Patch2: python-nose-unicode.patch
  23. # Allow docutils to read utf-8 source
  24. Patch3: python-nose-readunicode.patch
  25. # Fix Python 3.6 compatibility
  26. # Python now returns ModuleNotFoundError instead of the previous ImportError
  27. # https://github.com/nose-devs/nose/pull/1029
  28. Patch4: python-nose-py36.patch
  29. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  30. BuildArch: noarch
  31. BuildRequires: dos2unix
  32. BuildRequires: python-devel, python-setuptools, python-rpm-macros
  33. BuildRequires: python3-devel, python3-setuptools, python3-rpm-macros
  34. Requires: python-setuptools
  35. %description
  36. nose: a discovery-based unittest extension.
  37. nose provides an alternate test discovery and running process for unittest,
  38. one that is intended to mimic the behavior of py.test as much as is
  39. reasonably possible without resorting to too much magic.
  40. %package -n python3-nose
  41. Summary: A discovery-based unittest extension for Python
  42. Summary(ja): Python 用の発見型ユニットテスト・エクステンション
  43. Group: Development/Languages
  44. Requires: python3-setuptools
  45. %description -n python3-nose
  46. nose: a discovery-based unittest extension.
  47. nose provides an alternate test discovery and running process for unittest,
  48. one that is intended to mimic the behavior of py.test as much as is
  49. reasonably possible without resorting to too much magic.
  50. %prep
  51. %setup -qc
  52. pushd %{modname}-%{version}
  53. %autopatch -p1
  54. dos2unix examples/attrib_plugin.py
  55. cp -pr lgpl.txt AUTHORS CHANGELOG examples NEWS README.txt ..
  56. popd
  57. mv %{modname}-%{version} python2
  58. cp -pr python2 python3
  59. %build
  60. pushd python2
  61. %py_build
  62. popd
  63. pushd python3
  64. %py3_build
  65. popd
  66. %install
  67. rm -rf ${RPM_BUILD_ROOT}
  68. mkdir -p %{buildroot}%{_mandir}/man1
  69. pushd python2
  70. %py_install
  71. mv %{buildroot}%{_bindir}/nosetests{,-%{python_version}}
  72. ln -sf nosetests-%{python_version} %{buildroot}%{_bindir}/nosetests-2
  73. mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python_version}.1
  74. ln -sf nosetests-%{python_version}.1 %{buildroot}%{_mandir}/man1/nosetests-2.1
  75. popd
  76. pushd python3
  77. %py3_install
  78. mv %{buildroot}%{_bindir}/nosetests{,-%{python3_version}}
  79. ln -sf nosetests-%{python3_version} %{buildroot}%{_bindir}/nosetests-3
  80. mv %{buildroot}%{_prefix}/man/man1/nosetests.1 %{buildroot}%{_mandir}/man1/nosetests-%{python3_version}.1
  81. ln -sf nosetests-%{python3_version}.1 %{buildroot}%{_mandir}/man1/nosetests-3.1
  82. popd
  83. ln -sf nosetests-2 %{buildroot}%{_bindir}/nosetests
  84. ln -sf nosetests-2.1 %{buildroot}%{_mandir}/man1/nosetests.1
  85. %check
  86. pushd python2
  87. %{__python} selftest.py
  88. popd
  89. pushd python3
  90. %{__python3} setup.py build_tests
  91. %{__python3} selftest.py
  92. popd
  93. %clean
  94. rm -rf ${RPM_BUILD_ROOT}
  95. %files
  96. %defattr(-,root,root,-)
  97. %doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt
  98. %{_bindir}/nosetests
  99. %{_bindir}/nosetests-2*
  100. %{_mandir}/man1/nosetests.1*
  101. %{_mandir}/man1/nosetests-2*
  102. %{python_sitelib}/nose-%{version}-py%{pyver}.egg-info
  103. %{python_sitelib}/nose
  104. %files -n python3-nose
  105. %defattr(-,root,root,-)
  106. %doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt
  107. %{_bindir}/nosetests-3*
  108. %{_mandir}/man1/nosetests-3*
  109. %{python3_sitelib}/nose-%{version}-py%{python3_version}.egg-info
  110. %{python3_sitelib}/nose
  111. %changelog
  112. * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.7-1
  113. - new upstream release.
  114. - added python3 support.
  115. * Sun Apr 28 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.3.0-1
  116. - new upstream release
  117. - deleted Patch0
  118. * Sun Jun 24 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.1.2-1
  119. - new upstream release
  120. - added Patch0 from Debian sid to delete google analytics
  121. * Sat Feb 18 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.4-3
  122. - rebuild with python-2.7.2
  123. * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.10.4-2
  124. - rebuild with python-2.6
  125. * Sat Dec 20 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.10.4-1
  126. - initial build for Vine Linux based on fedora package
  127. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.4-1
  128. - Update to 0.10.4 to fix 2.6 issues
  129. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.3-2
  130. - Rebuild for Python 2.6
  131. * Sat Aug 02 2008 Luke Macken <lmacken@redhat.com> 0.10.3-1
  132. - Update to 0.10.3
  133. * Thu Feb 28 2008 Luke Macken <lmacken@redhat.com> 0.10.1-1
  134. - Update to 0.10.1
  135. * Mon Dec 3 2007 Luke Macken <lmacken@redhat.com> 0.10.0-2
  136. - Add python-setuptools to Requires (Bug #408491)
  137. * Tue Nov 27 2007 Luke Macken <lmacken@redhat.com> 0.10.0-1
  138. - 0.10.0
  139. * Sun Sep 2 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.3.b1
  140. - Update for python-setuptools changes in rawhide
  141. * Tue Aug 21 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.2.b1
  142. - 0.10.0b1
  143. - Update license tag to LGPLv2
  144. * Wed Jun 20 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.1.a2
  145. - 0.10.0a2
  146. * Sat Jun 2 2007 Luke Macken <lmacken@redhat.com> 0.9.3-1
  147. - Latest upstream release
  148. - Remove python-nose-0.9.2-mandir.patch
  149. * Sat Mar 3 2007 Luke Macken <lmacken@redhat.com> 0.9.2-1
  150. - Add nosetests(1) manpage, and python-nose-0.9.2-mandir.patch to put it in
  151. the correct location.
  152. - 0.9.2
  153. * Sat Dec 9 2006 Luke Macken <lmacken@redhat.com> 0.9.1-2
  154. - Rebuild for python 2.5
  155. * Fri Nov 24 2006 Luke Macken <lmacken@redhat.com> 0.9.1-1
  156. - 0.9.1
  157. * Fri Sep 8 2006 Luke Macken <lmacken@redhat.com> 0.9.0-1
  158. - 0.9.0
  159. * Wed Apr 19 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.8.7.2-1
  160. - Initial RPM release