]> git.pld-linux.org Git - packages/python-subunit.git/blame - python-subunit.spec
rebuild with tests and docs
[packages/python-subunit.git] / python-subunit.spec
CommitLineData
fd3c6536 1#
fd3c6536 2# Conditional build:
69bf9949
JB
3%bcond_without python2 # CPython 2.x module and tools
4%bcond_without python3 # CPython 3.x module and tools
cb33cc38 5%bcond_without tests # unit tests
fd3c6536 6
fd3c6536
JB
7Summary: subunit - streaming protocol for test results
8Summary(pl.UTF-8): subunit - protokół strumieniowy do wyników testów
9Name: python-subunit
44e9de92 10Version: 1.4.0
53ab5070 11Release: 4
fd3c6536
JB
12License: Apache v2.0 or BSD
13Group: Libraries/Python
cb33cc38
JB
14#Source0Download: https://pypi.org/simple/python-subunit/
15Source0: https://files.pythonhosted.org/packages/source/p/python-subunit/%{name}-%{version}.tar.gz
44e9de92 16# Source0-md5: 30f1ab20651d94442dd9a7f8c9e8d633
cb33cc38
JB
17Patch0: %{name}-tests.patch
18URL: https://pypi.org/project/python-subunit/
fd3c6536
JB
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-extras
44e9de92 23BuildRequires: python-modules >= 1:2.7
fd3c6536
JB
24BuildRequires: python-testtools >= 0.9.34
25%if %{with tests}
26BuildRequires: python-fixtures
27BuildRequires: python-hypothesis
28BuildRequires: python-testscenarios
cb33cc38 29BuildRequires: python-unittest2
fd3c6536
JB
30%endif
31%endif
32%if %{with python3}
33BuildRequires: python3-extras
44e9de92 34BuildRequires: python3-modules >= 1:3.5
fd3c6536
JB
35BuildRequires: python3-testtools >= 0.9.34
36%if %{with tests}
37BuildRequires: python3-fixtures
38BuildRequires: python3-hypothesis
39BuildRequires: python3-testscenarios
cb33cc38 40%endif
fd3c6536 41%endif
44e9de92 42Requires: python-modules >= 1:2.7
fd3c6536
JB
43BuildArch: noarch
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47Subunit is a streaming protocol for test results.
48
69bf9949
JB
49This package contains Python 2.x modules.
50
fd3c6536
JB
51%description -l pl.UTF-8
52Subunit to protokół strumieniowy przeznaczony do wyników testów.
53
69bf9949
JB
54Ten pakiet zawiera moduły Pythona 2.x.
55
69bf9949
JB
56%package -n subunit-python2
57Summary: Python 2 tools for subunit streaming protocol for test results
58Summary(pl.UTF-8): Narzędzia Pythona 2 dla protokołu strumieniowego do wyników testów subunit
59Group: Development/Tools
60Requires: python-subunit = %{version}-%{release}
61
62%description -n subunit-python2
63Python 2 tools for subunit streaming protocol for test results.
64
65%description -n subunit-python2 -l pl.UTF-8
66Narzędzia Pythona 2 dla protokołu strumieniowego do wyników testów
67subunit.
68
fd3c6536
JB
69%package -n python3-subunit
70Summary: subunit - streaming protocol for test results
71Summary(pl.UTF-8): subunit - protokół strumieniowy do wyników testów
72Group: Libraries/Python
fd3c6536 73Requires: python3-modules >= 1:3.2
fd3c6536
JB
74
75%description -n python3-subunit
76Subunit is a streaming protocol for test results.
77
69bf9949
JB
78This package contains Python 2.x modules.
79
fd3c6536
JB
80%description -n python3-subunit -l pl.UTF-8
81Subunit to protokół strumieniowy przeznaczony do wyników testów.
82
69bf9949
JB
83Ten pakiet zawiera moduły Pythona 2.x.
84
85%package -n subunit-python3
86Summary: Python 3 tools for subunit streaming protocol for test results
87Summary(pl.UTF-8): Narzędzia Pythona 3 dla protokołu strumieniowego do wyników testów subunit
88Group: Development/Tools
89Requires: python3-subunit = %{version}-%{release}
90
91%description -n subunit-python3
92Python 3 tools for subunit streaming protocol for test results.
93
94%description -n subunit-python3 -l pl.UTF-8
95Narzędzia Pythona 3 dla protokołu strumieniowego do wyników testów
96subunit.
97
7faa05ec
JB
98%package -n subunit-python
99Summary: Python tools for subunit streaming protocol for test results
100Summary(pl.UTF-8): Pythonowe narzędzia dla protokołu strumieniowego do wyników testów subunit
101Group: Development/Tools
102%if %{with python3}
103Requires: subunit-python3 = %{version}-%{release}
104%else
105Requires: subunit-python2 = %{version}-%{release}
106%endif
107
108%description -n subunit-python
109Python tools for subunit streaming protocol for test results.
110
111%description -n subunit-python -l pl.UTF-8
112Pythonowe narzędzia dla protokołu strumieniowego do wyników testów
113subunit.
114
fd3c6536
JB
115%prep
116%setup -q
cb33cc38 117%patch0 -p1
fd3c6536
JB
118
119%build
120%if %{with python2}
cb33cc38
JB
121%py_build
122
123%if %{with tests}
124PYTHONPATH=$(pwd)/python \
125%{__python} -m subunit.run subunit.tests.test_suite | PYTHONPATH=$(pwd)/python %{__python} filters/subunit2pyunit
126%endif
fd3c6536
JB
127%endif
128
129%if %{with python3}
cb33cc38
JB
130%py3_build
131
132%if %{with tests}
133PYTHONPATH=$(pwd)/python \
134%{__python3} -m subunit.run subunit.tests.test_suite | PYTHONPATH=$(pwd)/python %{__python3} filters/subunit2pyunit
135%endif
fd3c6536
JB
136%endif
137
138%install
139rm -rf $RPM_BUILD_ROOT
140
fd3c6536
JB
141%if %{with python2}
142%py_install
143
144%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/subunit/tests
145%py_postclean
146
7faa05ec 147for f in $RPM_BUILD_ROOT%{_bindir}/* ; do
fd3c6536 148 %{__mv} "$f" "${f}-2"
7faa05ec 149%if %{without python3}
fd3c6536 150 ln -sf $(basename $f)-2 "$f"
7faa05ec
JB
151%endif
152done
153%endif
154
155%if %{with python3}
156%py3_install
157
158%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/subunit/tests
159
160for 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"
164 fi
fd3c6536
JB
165done
166%endif
167
168%clean
169rm -rf $RPM_BUILD_ROOT
170
171%if %{with python2}
172%files
173%defattr(644,root,root,755)
174%doc NEWS README.rst
69bf9949
JB
175%{py_sitescriptdir}/subunit
176%{py_sitescriptdir}/python_subunit-%{version}-py*.egg-info
177
69bf9949
JB
178%files -n subunit-python2
179%defattr(644,root,root,755)
fd3c6536
JB
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
cb33cc38 189%attr(755,root,root) %{_bindir}/subunit2disk-2
fd3c6536
JB
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
fd3c6536
JB
194%endif
195
196%if %{with python3}
197%files -n python3-subunit
198%defattr(644,root,root,755)
199%doc NEWS README.rst
69bf9949
JB
200%{py3_sitescriptdir}/subunit
201%{py3_sitescriptdir}/python_subunit-%{version}-py*.egg-info
202
203%files -n subunit-python3
204%defattr(644,root,root,755)
fd3c6536
JB
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
cb33cc38 214%attr(755,root,root) %{_bindir}/subunit2disk-3
fd3c6536
JB
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
fd3c6536 219%endif
7faa05ec
JB
220
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
This page took 0.161968 seconds and 4 git commands to generate.