3 %bcond_without python2 # CPython 2.x module and tools
4 %bcond_without python3 # CPython 3.x module and tools
5 %bcond_without tests # unit tests
7 Summary: subunit - streaming protocol for test results
8 Summary(pl.UTF-8): subunit - protokół strumieniowy do wyników testów
12 License: Apache v2.0 or BSD
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/python-subunit/
15 Source0: https://files.pythonhosted.org/packages/source/p/python-subunit/%{name}-%{version}.tar.gz
16 # Source0-md5: 30f1ab20651d94442dd9a7f8c9e8d633
17 Patch0: %{name}-tests.patch
18 URL: https://pypi.org/project/python-subunit/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-extras
23 BuildRequires: python-modules >= 1:2.7
24 BuildRequires: python-testtools >= 0.9.34
26 BuildRequires: python-fixtures
27 BuildRequires: python-hypothesis
28 BuildRequires: python-testscenarios
29 BuildRequires: python-unittest2
33 BuildRequires: python3-extras
34 BuildRequires: python3-modules >= 1:3.5
35 BuildRequires: python3-testtools >= 0.9.34
37 BuildRequires: python3-fixtures
38 BuildRequires: python3-hypothesis
39 BuildRequires: python3-testscenarios
42 Requires: python-modules >= 1:2.7
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Subunit is a streaming protocol for test results.
49 This package contains Python 2.x modules.
51 %description -l pl.UTF-8
52 Subunit to protokół strumieniowy przeznaczony do wyników testów.
54 Ten pakiet zawiera moduły Pythona 2.x.
56 %package -n subunit-python2
57 Summary: Python 2 tools for subunit streaming protocol for test results
58 Summary(pl.UTF-8): Narzędzia Pythona 2 dla protokołu strumieniowego do wyników testów subunit
59 Group: Development/Tools
60 Requires: python-subunit = %{version}-%{release}
62 %description -n subunit-python2
63 Python 2 tools for subunit streaming protocol for test results.
65 %description -n subunit-python2 -l pl.UTF-8
66 Narzędzia Pythona 2 dla protokołu strumieniowego do wyników testów
69 %package -n python3-subunit
70 Summary: subunit - streaming protocol for test results
71 Summary(pl.UTF-8): subunit - protokół strumieniowy do wyników testów
72 Group: Libraries/Python
73 Requires: python3-modules >= 1:3.2
75 %description -n python3-subunit
76 Subunit is a streaming protocol for test results.
78 This package contains Python 2.x modules.
80 %description -n python3-subunit -l pl.UTF-8
81 Subunit to protokół strumieniowy przeznaczony do wyników testów.
83 Ten pakiet zawiera moduły Pythona 2.x.
85 %package -n subunit-python3
86 Summary: Python 3 tools for subunit streaming protocol for test results
87 Summary(pl.UTF-8): Narzędzia Pythona 3 dla protokołu strumieniowego do wyników testów subunit
88 Group: Development/Tools
89 Requires: python3-subunit = %{version}-%{release}
91 %description -n subunit-python3
92 Python 3 tools for subunit streaming protocol for test results.
94 %description -n subunit-python3 -l pl.UTF-8
95 Narzędzia Pythona 3 dla protokołu strumieniowego do wyników testów
98 %package -n subunit-python
99 Summary: Python tools for subunit streaming protocol for test results
100 Summary(pl.UTF-8): Pythonowe narzędzia dla protokołu strumieniowego do wyników testów subunit
101 Group: Development/Tools
103 Requires: subunit-python3 = %{version}-%{release}
105 Requires: subunit-python2 = %{version}-%{release}
108 %description -n subunit-python
109 Python tools for subunit streaming protocol for test results.
111 %description -n subunit-python -l pl.UTF-8
112 Pythonowe narzędzia dla protokołu strumieniowego do wyników testów
124 PYTHONPATH=$(pwd)/python \
125 %{__python} -m subunit.run subunit.tests.test_suite | PYTHONPATH=$(pwd)/python %{__python} filters/subunit2pyunit
133 PYTHONPATH=$(pwd)/python \
134 %{__python3} -m subunit.run subunit.tests.test_suite | PYTHONPATH=$(pwd)/python %{__python3} filters/subunit2pyunit
139 rm -rf $RPM_BUILD_ROOT
144 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/subunit/tests
147 for f in $RPM_BUILD_ROOT%{_bindir}/* ; do
148 %{__mv} "$f" "${f}-2"
149 %if %{without python3}
150 ln -sf $(basename $f)-2 "$f"
158 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/subunit/tests
160 for f in $RPM_BUILD_ROOT%{_bindir}/* ; do
161 if [ "${f%%-2}" = "$f" ]; then
162 %{__mv} "$f" "${f}-3"
163 ln -sf $(basename $f)-3 "$f"
169 rm -rf $RPM_BUILD_ROOT
173 %defattr(644,root,root,755)
175 %{py_sitescriptdir}/subunit
176 %{py_sitescriptdir}/python_subunit-%{version}-py*.egg-info
178 %files -n subunit-python2
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_bindir}/subunit-1to2-2
181 %attr(755,root,root) %{_bindir}/subunit-2to1-2
182 %attr(755,root,root) %{_bindir}/subunit-filter-2
183 %attr(755,root,root) %{_bindir}/subunit-ls-2
184 %attr(755,root,root) %{_bindir}/subunit-notify-2
185 %attr(755,root,root) %{_bindir}/subunit-output-2
186 %attr(755,root,root) %{_bindir}/subunit-stats-2
187 %attr(755,root,root) %{_bindir}/subunit-tags-2
188 %attr(755,root,root) %{_bindir}/subunit2csv-2
189 %attr(755,root,root) %{_bindir}/subunit2disk-2
190 %attr(755,root,root) %{_bindir}/subunit2gtk-2
191 %attr(755,root,root) %{_bindir}/subunit2junitxml-2
192 %attr(755,root,root) %{_bindir}/subunit2pyunit-2
193 %attr(755,root,root) %{_bindir}/tap2subunit-2
197 %files -n python3-subunit
198 %defattr(644,root,root,755)
200 %{py3_sitescriptdir}/subunit
201 %{py3_sitescriptdir}/python_subunit-%{version}-py*.egg-info
203 %files -n subunit-python3
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_bindir}/subunit-1to2-3
206 %attr(755,root,root) %{_bindir}/subunit-2to1-3
207 %attr(755,root,root) %{_bindir}/subunit-filter-3
208 %attr(755,root,root) %{_bindir}/subunit-ls-3
209 %attr(755,root,root) %{_bindir}/subunit-notify-3
210 %attr(755,root,root) %{_bindir}/subunit-output-3
211 %attr(755,root,root) %{_bindir}/subunit-stats-3
212 %attr(755,root,root) %{_bindir}/subunit-tags-3
213 %attr(755,root,root) %{_bindir}/subunit2csv-3
214 %attr(755,root,root) %{_bindir}/subunit2disk-3
215 %attr(755,root,root) %{_bindir}/subunit2gtk-3
216 %attr(755,root,root) %{_bindir}/subunit2junitxml-3
217 %attr(755,root,root) %{_bindir}/subunit2pyunit-3
218 %attr(755,root,root) %{_bindir}/tap2subunit-3
221 %files -n subunit-python
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_bindir}/subunit-1to2
224 %attr(755,root,root) %{_bindir}/subunit-2to1
225 %attr(755,root,root) %{_bindir}/subunit-filter
226 %attr(755,root,root) %{_bindir}/subunit-ls
227 %attr(755,root,root) %{_bindir}/subunit-notify
228 %attr(755,root,root) %{_bindir}/subunit-output
229 %attr(755,root,root) %{_bindir}/subunit-stats
230 %attr(755,root,root) %{_bindir}/subunit-tags
231 %attr(755,root,root) %{_bindir}/subunit2csv
232 %attr(755,root,root) %{_bindir}/subunit2disk
233 %attr(755,root,root) %{_bindir}/subunit2gtk
234 %attr(755,root,root) %{_bindir}/subunit2junitxml
235 %attr(755,root,root) %{_bindir}/subunit2pyunit
236 %attr(755,root,root) %{_bindir}/tap2subunit