3 %bcond_without tests # make check [note: testBasicSortTests sometimes fails, non-deterministically]
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Testresources - pyunit extension for managing expensive test resources
8 Summary(pl.UTF-8): Testresources - rozszerzenie pyunit do zarządzania kosztownymi zasobami dla testów
9 Name: python-testresources
12 License: Apache v2.0 or BSD
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/testresources/
15 Source0: https://files.pythonhosted.org/packages/source/t/testresources/testresources-%{version}.tar.gz
16 # Source0-md5: 8873ab443db5569528964f524228a2d7
17 Patch0: %{name}-tests.patch
18 URL: https://launchpad.net/testresources
20 BuildRequires: python-modules >= 1:2.6
21 BuildRequires: python-pbr >= 1.3
22 BuildRequires: python-setuptools
24 BuildRequires: python-docutils
25 BuildRequires: python-fixtures
26 BuildRequires: python-testtools
30 BuildRequires: python3-modules >= 1:3.3
31 BuildRequires: python3-pbr >= 1.3
32 BuildRequires: python3-setuptools
34 BuildRequires: python3-docutils
35 BuildRequires: python3-fixtures
36 BuildRequires: python3-testtools
39 BuildRequires: rpm-pythonprov
40 BuildRequires: rpmbuild(macros) >= 1.714
41 Requires: python-fixtures
42 Requires: python-modules >= 1:2.6
43 Requires: python-testtools
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 testresources extends unittest with a clean and simple API to provide
49 test optimisation where expensive common resources are needed for test
50 cases - for example sample working trees for VCS systems, reference
51 databases for enterprise applications, or web servers.
53 %description -l pl.UTF-8
54 Moduł testresources rozszerza moduł unittest o czyste i proste API
55 pozwalające na optymalizację testów w przypadku, kiedy przypadki
56 testowe wymagają kosztownych wspólnych zasobów - np. przykładowych
57 drzew roboczych dla systemów kontroli wersji, wzorcowe bazy danych dla
58 aplikacji biznesowych albo serwerów WWW.
60 %package -n python3-testresources
61 Summary: Testresources - pyunit extension for managing expensive test resources
62 Summary(pl.UTF-8): Testresources - rozszerzenie pyunit do zarządzania kosztownymi zasobami dla testów
63 Group: Libraries/Python
64 Requires: python3-fixtures
65 Requires: python3-modules >= 1:3.3
66 Requires: python3-testtools
68 %description -n python3-testresources
69 testresources extends unittest with a clean and simple API to provide
70 test optimisation where expensive common resources are needed for test
71 cases - for example sample working trees for VCS systems, reference
72 databases for enterprise applications, or web servers.
74 %description -n python3-testresources -l pl.UTF-8
75 Moduł testresources rozszerza moduł unittest o czyste i proste API
76 pozwalające na optymalizację testów w przypadku, kiedy przypadki
77 testowe wymagają kosztownych wspólnych zasobów - np. przykładowych
78 drzew roboczych dla systemów kontroli wersji, wzorcowe bazy danych dla
79 aplikacji biznesowych albo serwerów WWW.
82 %setup -q -n testresources-%{version}
89 %{?with_tests:%{__make} check PYTHON=%{__python}}
95 %{?with_tests:%{__make} check PYTHON=%{__python3}}
99 rm -rf $RPM_BUILD_ROOT
105 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/testresources/tests
110 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/testresources/tests
114 rm -rf $RPM_BUILD_ROOT
118 %defattr(644,root,root,755)
119 %doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README.rst TODO
120 %{py_sitescriptdir}/testresources
121 %{py_sitescriptdir}/testresources-%{version}-py*.egg-info
125 %files -n python3-testresources
126 %defattr(644,root,root,755)
127 %doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README.rst TODO
128 %{py3_sitescriptdir}/testresources
129 %{py3_sitescriptdir}/testresources-%{version}-py*.egg-info