python-unittest2-vl.spec 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  2. %global srcname unittest2
  3. Name: python-%{srcname}
  4. Version: 0.5.1
  5. Release: 2%{?_dist_release}
  6. Summary: Backport of new unittest features for Python 2.7 to Python 2.4+
  7. Summary(ja): Python 2.7 から Python 2.4+ 用の新しいユニットテスト機能のバックポート
  8. Group: Development/Languages
  9. License: BSD
  10. URL: http://pypi.python.org/pypi/unittest2
  11. Source0: http://pypi.python.org/packages/source/u/%{srcname}/%{srcname}-%{version}.tar.gz
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  13. BuildArch: noarch
  14. BuildRequires: python-devel
  15. BuildRequires: python-setuptools
  16. BuildRequires: python-nose
  17. %description
  18. unittest2 is a backport of the new features added to the unittest
  19. testing framework in Python 2.7. It is tested to run on Python 2.4 -
  20. 2.6.
  21. To use unittest2 instead of unittest simply replace ``import unittest``
  22. with ``import unittest2``.
  23. Classes in unittest2 derive from the equivalent classes in unittest,
  24. so it should be possible to use the unittest2 test running infra-
  25. structure without having to switch all your tests to using unittest2
  26. immediately. Similarly
  27. you can use the new assert methods on ``unittest2.TestCase`` with the
  28. standard unittest test running infrastructure. Not all of the new
  29. features in unittest2 will work with the standard unittest test loaders
  30. and runners however.
  31. %prep
  32. %setup -q -n %{srcname}-%{version}
  33. %build
  34. %{__python} setup.py build
  35. %install
  36. rm -rf %{buildroot}
  37. %{__python} setup.py install --skip-build --root %{buildroot}
  38. %clean
  39. rm -rf %{buildroot}
  40. %check
  41. #Failing test deactivated
  42. cd unittest2/test
  43. nosetests test_new_tests.py
  44. #nosetests test_unittest2.py
  45. nosetests test_unittest2_with.py
  46. %files
  47. %defattr(-,root,root,-)
  48. %doc README.txt
  49. %{_bindir}/unit2*
  50. %{python_sitelib}/%{srcname}/
  51. %{python_sitelib}/%{srcname}*.egg-info
  52. %changelog
  53. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.5.1-2
  54. - rebuild with python-2.7.2
  55. * Sat Jan 28 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5.1-1
  56. - initial build for Vine Linux
  57. * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-3
  58. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  59. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2
  60. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  61. * Wed Jul 21 2010 Fabian Affolter <fabian@bernewireless.net> - 0.5.1-1
  62. - Updated to new upstream version 0.5.1
  63. * Sat Jul 03 2010 Fabian Affolter <fabian@bernewireless.net> - 0.5.0-1
  64. - Removed build cond for check section
  65. - Switched to python2-devel
  66. - Updated to new upstream version 0.5.0
  67. * Sat Jul 03 2010 Fabian Affolter <fabian@bernewireless.net> - 0.1.4-1
  68. - Initial package