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