]> git.pld-linux.org Git - packages/python-subunit.git/blob - python-subunit.spec
- separated subunit-python* packages with tools; release 2
[packages/python-subunit.git] / python-subunit.spec
1 #
2 # Conditional build:
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
6
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
10 Name:           python-subunit
11 Version:        1.2.0
12 Release:        2
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
21 %if %{with python2}
22 BuildRequires:  python-extras
23 BuildRequires:  python-modules >= 1:2.6
24 BuildRequires:  python-testtools >= 0.9.34
25 %if %{with tests}
26 BuildRequires:  python-fixtures
27 BuildRequires:  python-hypothesis
28 BuildRequires:  python-testscenarios
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-extras
33 BuildRequires:  python3-modules >= 1:3.2
34 BuildRequires:  python3-testtools >= 0.9.34
35 %if %{with tests}
36 BuildRequires:  python3-fixtures
37 BuildRequires:  python3-hypothesis
38 BuildRequires:  python3-testscenarios
39 %endif
40 %endif
41 Requires:       python-extras
42 Requires:       python-modules >= 1:2.6
43 Requires:       python-testtools >= 0.9.34
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 Subunit is a streaming protocol for test results.
49
50 This package contains Python 2.x modules.
51
52 %description -l pl.UTF-8
53 Subunit to protokół strumieniowy przeznaczony do wyników testów.
54
55 Ten pakiet zawiera moduły Pythona 2.x.
56
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}
62
63 %description -n subunit-python
64 Python tools for subunit streaming protocol for test results.
65
66 %description -n subunit-python -l pl.UTF-8
67 Pythonowe narzędzia dla protokołu strumieniowego do wyników testów
68 subunit.
69
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}
75
76 %description -n subunit-python2
77 Python 2 tools for subunit streaming protocol for test results.
78
79 %description -n subunit-python2 -l pl.UTF-8
80 Narzędzia Pythona 2 dla protokołu strumieniowego do wyników testów
81 subunit.
82
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
90
91 %description -n python3-subunit
92 Subunit is a streaming protocol for test results.
93
94 This package contains Python 2.x modules.
95
96 %description -n python3-subunit -l pl.UTF-8
97 Subunit to protokół strumieniowy przeznaczony do wyników testów.
98
99 Ten pakiet zawiera moduły Pythona 2.x.
100
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}
106
107 %description -n subunit-python3
108 Python 3 tools for subunit streaming protocol for test results.
109
110 %description -n subunit-python3 -l pl.UTF-8
111 Narzędzia Pythona 3 dla protokołu strumieniowego do wyników testów
112 subunit.
113
114 %prep
115 %setup -q
116
117 %build
118 %if %{with python2}
119 %py_build %{?with_tests:test}
120 %endif
121
122 %if %{with python3}
123 %py3_build %{?with_tests:test}
124 %endif
125
126 %install
127 rm -rf $RPM_BUILD_ROOT
128
129 %if %{with python3}
130 %py3_install
131
132 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/subunit/tests
133
134 for f in $RPM_BUILD_ROOT%{_bindir}/* ; do
135         %{__mv} "$f" "${f}-3"
136 done
137 %endif
138
139 %if %{with python2}
140 %py_install
141
142 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/subunit/tests
143 %py_postclean
144
145 for f in $RPM_BUILD_ROOT%{_bindir}/*[!3]; do
146         %{__mv} "$f" "${f}-2"
147         ln -sf $(basename $f)-2 "$f"
148 done
149 %endif
150
151 %clean
152 rm -rf $RPM_BUILD_ROOT
153
154 %if %{with python2}
155 %files
156 %defattr(644,root,root,755)
157 %doc NEWS README.rst
158 %{py_sitescriptdir}/subunit
159 %{py_sitescriptdir}/python_subunit-%{version}-py*.egg-info
160
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
176
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
192 %endif
193
194 %if %{with python3}
195 %files -n python3-subunit
196 %defattr(644,root,root,755)
197 %doc NEWS README.rst
198 %{py3_sitescriptdir}/subunit
199 %{py3_sitescriptdir}/python_subunit-%{version}-py*.egg-info
200
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
216 %endif
This page took 0.070198 seconds and 3 git commands to generate.