]> git.pld-linux.org Git - packages/python-testresources.git/blob - python-testresources.spec
8689ce0cb71ac481dfa8478b5bcfdb12755d3014
[packages/python-testresources.git] / python-testresources.spec
1 #
2 # Conditional build:
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
6
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
10 Version:        2.0.1
11 Release:        5
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
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-pbr >= 1.3
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-docutils
25 BuildRequires:  python-fixtures
26 BuildRequires:  python-testtools
27 %endif
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules >= 1:3.3
31 BuildRequires:  python3-pbr >= 1.3
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-docutils
35 BuildRequires:  python3-fixtures
36 BuildRequires:  python3-testtools
37 %endif
38 %endif
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
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
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.
52
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.
59
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
67
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.
73
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.
80
81 %prep
82 %setup -q -n testresources-%{version}
83 %patch0 -p1
84
85 %build
86 %if %{with python2}
87 %py_build
88
89 %{?with_tests:%{__make} check PYTHON=%{__python}}
90 %endif
91
92 %if %{with python3}
93 %py3_build
94
95 %{?with_tests:%{__make} check PYTHON=%{__python3}}
96 %endif
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %py_install
103
104 %py_postclean
105 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/testresources/tests
106 %endif
107
108 %if %{with python3}
109 %py3_install
110 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/testresources/tests
111 %endif
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %if %{with python2}
117 %files
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
122 %endif
123
124 %if %{with python3}
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
130 %endif
This page took 0.088764 seconds and 2 git commands to generate.