python-nose-vl.spec 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. %define modname nose
  2. Summary: A discovery-based unittest extension for Python
  3. Summary(ja): Python 用の発見型ユニットテスト・エクステンション
  4. Name: python-nose
  5. Version: 1.3.7
  6. Release: 2%{?_dist_release}
  7. Group: programming
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: LGPLv2
  11. URL: http://somethingaboutorange.com/mrl/projects/nose/
  12. Source0: http://somethingaboutorange.com/mrl/projects/nose/nose-%{version}.tar.gz
  13. # Make compatible with coverage 4.1
  14. # https://github.com/nose-devs/nose/pull/1004
  15. Patch0: python-nose-coverage4.patch
  16. # Fix python 3.5 compat
  17. # https://github.com/nose-devs/nose/pull/983
  18. Patch1: python-nose-py35.patch
  19. # Fix UnicodeDecodeError with captured output
  20. # https://github.com/nose-devs/nose/pull/988
  21. Patch2: python-nose-unicode.patch
  22. # Allow docutils to read utf-8 source
  23. Patch3: python-nose-readunicode.patch
  24. # Fix Python 3.6 compatibility
  25. # Python now returns ModuleNotFoundError instead of the previous ImportError
  26. # https://github.com/nose-devs/nose/pull/1029
  27. Patch4: python-nose-py36.patch
  28. BuildArch: noarch
  29. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  30. BuildRequires: dos2unix
  31. BuildRequires: python-rpm-macros
  32. BuildRequires: python-devel, python-setuptools, python2-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: programming
  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. %py2_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. %py2_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-3 %{buildroot}%{_bindir}/nosetests
  84. ln -sf nosetests-3.1 %{buildroot}%{_mandir}/man1/nosetests.1
  85. %check
  86. pushd python2
  87. %{__python2} 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-2*
  99. %{_mandir}/man1/nosetests-2*
  100. %{python_sitelib}/nose-%{version}-py%{pyver}.egg-info
  101. %{python_sitelib}/nose
  102. %files -n python3-nose
  103. %defattr(-,root,root,-)
  104. %doc AUTHORS CHANGELOG lgpl.txt NEWS README.txt
  105. %{_bindir}/nosetests
  106. %{_bindir}/nosetests-3*
  107. %{_mandir}/man1/nosetests.1*
  108. %{_mandir}/man1/nosetests-3*
  109. %{python3_sitelib}/nose-%{version}-py%{python3_version}.egg-info
  110. %{python3_sitelib}/nose
  111. %changelog
  112. * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.7-2
  113. - built with python-3.8.
  114. * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.7-1
  115. - new upstream release.
  116. - added python3 support.
  117. * Sun Apr 28 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.3.0-1
  118. - new upstream release
  119. - deleted Patch0
  120. * Sun Jun 24 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.1.2-1
  121. - new upstream release
  122. - added Patch0 from Debian sid to delete google analytics
  123. * Sat Feb 18 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.10.4-3
  124. - rebuild with python-2.7.2
  125. * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.10.4-2
  126. - rebuild with python-2.6
  127. * Sat Dec 20 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.10.4-1
  128. - initial build for Vine Linux based on fedora package
  129. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.4-1
  130. - Update to 0.10.4 to fix 2.6 issues
  131. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.10.3-2
  132. - Rebuild for Python 2.6
  133. * Sat Aug 02 2008 Luke Macken <lmacken@redhat.com> 0.10.3-1
  134. - Update to 0.10.3
  135. * Thu Feb 28 2008 Luke Macken <lmacken@redhat.com> 0.10.1-1
  136. - Update to 0.10.1
  137. * Mon Dec 3 2007 Luke Macken <lmacken@redhat.com> 0.10.0-2
  138. - Add python-setuptools to Requires (Bug #408491)
  139. * Tue Nov 27 2007 Luke Macken <lmacken@redhat.com> 0.10.0-1
  140. - 0.10.0
  141. * Sun Sep 2 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.3.b1
  142. - Update for python-setuptools changes in rawhide
  143. * Tue Aug 21 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.2.b1
  144. - 0.10.0b1
  145. - Update license tag to LGPLv2
  146. * Wed Jun 20 2007 Luke Macken <lmacken@redhat.com> 0.10.0-0.1.a2
  147. - 0.10.0a2
  148. * Sat Jun 2 2007 Luke Macken <lmacken@redhat.com> 0.9.3-1
  149. - Latest upstream release
  150. - Remove python-nose-0.9.2-mandir.patch
  151. * Sat Mar 3 2007 Luke Macken <lmacken@redhat.com> 0.9.2-1
  152. - Add nosetests(1) manpage, and python-nose-0.9.2-mandir.patch to put it in
  153. the correct location.
  154. - 0.9.2
  155. * Sat Dec 9 2006 Luke Macken <lmacken@redhat.com> 0.9.1-2
  156. - Rebuild for python 2.5
  157. * Fri Nov 24 2006 Luke Macken <lmacken@redhat.com> 0.9.1-1
  158. - 0.9.1
  159. * Fri Sep 8 2006 Luke Macken <lmacken@redhat.com> 0.9.0-1
  160. - 0.9.0
  161. * Wed Apr 19 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.8.7.2-1
  162. - Initial RPM release