3 %bcond_without python2 # CPython 2.x module and tools
4 %bcond_without python3 # CPython 3.x module and tools
5 %bcond_without tests # test target
7 %define module template
8 Summary: subunit - streaming protocol for test results
9 Summary(pl.UTF-8): subunit - protokół strumieniowy do wyników testów
13 License: Apache v2.0 or BSD
14 Group: Libraries/Python
15 #Source0Download: https://pypi.python.org/simple/python-subunit/
16 Source0: https://pypi.python.org/packages/source/p/python-subunit/%{name}-%{version}.tar.gz
17 # Source0-md5: 3305455dfe22e2b8666531909c026a2f
18 URL: https://pypi.python.org/pypi/python-subunit
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-extras
23 BuildRequires: python-modules >= 1:2.6
24 BuildRequires: python-testtools >= 0.9.34
26 BuildRequires: python-fixtures
27 BuildRequires: python-hypothesis
28 BuildRequires: python-testscenarios
32 BuildRequires: python3-extras
33 BuildRequires: python3-modules >= 1:3.2
34 BuildRequires: python3-testtools >= 0.9.34
36 BuildRequires: python3-fixtures
37 BuildRequires: python3-hypothesis
38 BuildRequires: python3-testscenarios
41 Requires: python-extras
42 Requires: python-modules >= 1:2.6
43 Requires: python-testtools >= 0.9.34
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Subunit is a streaming protocol for test results.
50 This package contains Python 2.x modules.
52 %description -l pl.UTF-8
53 Subunit to protokół strumieniowy przeznaczony do wyników testów.
55 Ten pakiet zawiera moduły Pythona 2.x.
57 %package -n subunit-python
58 Summary: Python tools for subunit streaming protocol for test results
59 Summary(pl.UTF-8): Pythonowe narzędzia dla protokołu strumieniowego do wyników testów subunit
60 Group: Development/Tools
61 Requires: subunit-python2 = %{version}-%{release}
63 %description -n subunit-python
64 Python tools for subunit streaming protocol for test results.
66 %description -n subunit-python -l pl.UTF-8
67 Pythonowe narzędzia dla protokołu strumieniowego do wyników testów
70 %package -n subunit-python2
71 Summary: Python 2 tools for subunit streaming protocol for test results
72 Summary(pl.UTF-8): Narzędzia Pythona 2 dla protokołu strumieniowego do wyników testów subunit
73 Group: Development/Tools
74 Requires: python-subunit = %{version}-%{release}
76 %description -n subunit-python2
77 Python 2 tools for subunit streaming protocol for test results.
79 %description -n subunit-python2 -l pl.UTF-8
80 Narzędzia Pythona 2 dla protokołu strumieniowego do wyników testów
83 %package -n python3-subunit
84 Summary: subunit - streaming protocol for test results
85 Summary(pl.UTF-8): subunit - protokół strumieniowy do wyników testów
86 Group: Libraries/Python
87 Requires: python3-extras
88 Requires: python3-modules >= 1:3.2
89 Requires: python3-testtools >= 0.9.34
91 %description -n python3-subunit
92 Subunit is a streaming protocol for test results.
94 This package contains Python 2.x modules.
96 %description -n python3-subunit -l pl.UTF-8
97 Subunit to protokół strumieniowy przeznaczony do wyników testów.
99 Ten pakiet zawiera moduły Pythona 2.x.
101 %package -n subunit-python3
102 Summary: Python 3 tools for subunit streaming protocol for test results
103 Summary(pl.UTF-8): Narzędzia Pythona 3 dla protokołu strumieniowego do wyników testów subunit
104 Group: Development/Tools
105 Requires: python3-subunit = %{version}-%{release}
107 %description -n subunit-python3
108 Python 3 tools for subunit streaming protocol for test results.
110 %description -n subunit-python3 -l pl.UTF-8
111 Narzędzia Pythona 3 dla protokołu strumieniowego do wyników testów
119 %py_build %{?with_tests:test}
123 %py3_build %{?with_tests:test}
127 rm -rf $RPM_BUILD_ROOT
132 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/subunit/tests
134 for f in $RPM_BUILD_ROOT%{_bindir}/* ; do
135 %{__mv} "$f" "${f}-3"
142 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/subunit/tests
145 for f in $RPM_BUILD_ROOT%{_bindir}/*[!3]; do
146 %{__mv} "$f" "${f}-2"
147 ln -sf $(basename $f)-2 "$f"
152 rm -rf $RPM_BUILD_ROOT
156 %defattr(644,root,root,755)
158 %{py_sitescriptdir}/subunit
159 %{py_sitescriptdir}/python_subunit-%{version}-py*.egg-info
161 %files -n subunit-python
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_bindir}/subunit-1to2
164 %attr(755,root,root) %{_bindir}/subunit-2to1
165 %attr(755,root,root) %{_bindir}/subunit-filter
166 %attr(755,root,root) %{_bindir}/subunit-ls
167 %attr(755,root,root) %{_bindir}/subunit-notify
168 %attr(755,root,root) %{_bindir}/subunit-output
169 %attr(755,root,root) %{_bindir}/subunit-stats
170 %attr(755,root,root) %{_bindir}/subunit-tags
171 %attr(755,root,root) %{_bindir}/subunit2csv
172 %attr(755,root,root) %{_bindir}/subunit2gtk
173 %attr(755,root,root) %{_bindir}/subunit2junitxml
174 %attr(755,root,root) %{_bindir}/subunit2pyunit
175 %attr(755,root,root) %{_bindir}/tap2subunit
177 %files -n subunit-python2
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/subunit-1to2-2
180 %attr(755,root,root) %{_bindir}/subunit-2to1-2
181 %attr(755,root,root) %{_bindir}/subunit-filter-2
182 %attr(755,root,root) %{_bindir}/subunit-ls-2
183 %attr(755,root,root) %{_bindir}/subunit-notify-2
184 %attr(755,root,root) %{_bindir}/subunit-output-2
185 %attr(755,root,root) %{_bindir}/subunit-stats-2
186 %attr(755,root,root) %{_bindir}/subunit-tags-2
187 %attr(755,root,root) %{_bindir}/subunit2csv-2
188 %attr(755,root,root) %{_bindir}/subunit2gtk-2
189 %attr(755,root,root) %{_bindir}/subunit2junitxml-2
190 %attr(755,root,root) %{_bindir}/subunit2pyunit-2
191 %attr(755,root,root) %{_bindir}/tap2subunit-2
195 %files -n python3-subunit
196 %defattr(644,root,root,755)
198 %{py3_sitescriptdir}/subunit
199 %{py3_sitescriptdir}/python_subunit-%{version}-py*.egg-info
201 %files -n subunit-python3
202 %defattr(644,root,root,755)
203 %attr(755,root,root) %{_bindir}/subunit-1to2-3
204 %attr(755,root,root) %{_bindir}/subunit-2to1-3
205 %attr(755,root,root) %{_bindir}/subunit-filter-3
206 %attr(755,root,root) %{_bindir}/subunit-ls-3
207 %attr(755,root,root) %{_bindir}/subunit-notify-3
208 %attr(755,root,root) %{_bindir}/subunit-output-3
209 %attr(755,root,root) %{_bindir}/subunit-stats-3
210 %attr(755,root,root) %{_bindir}/subunit-tags-3
211 %attr(755,root,root) %{_bindir}/subunit2csv-3
212 %attr(755,root,root) %{_bindir}/subunit2gtk-3
213 %attr(755,root,root) %{_bindir}/subunit2junitxml-3
214 %attr(755,root,root) %{_bindir}/subunit2pyunit-3
215 %attr(755,root,root) %{_bindir}/tap2subunit-3