3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests (running fails?)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define _enable_debug_packages 0
10 Summary: Flexible test runner with layer support
11 Summary(pl.UTF-8): Elastyczne uruchamianie testów z obsługą warstw
12 Name: python-zope.testrunner
16 Group: Libraries/Python
17 #Source0Download: https://pypi.org/simple/zope.testrunner/
18 Source0: https://files.pythonhosted.org/packages/source/z/zope.testrunner/zope.testrunner-%{version}.tar.gz
19 # Source0-md5: 5c10b7bda7803c34140a657715049fc9
20 URL: https://www.zope.org/
22 BuildRequires: python >= 1:2.7
23 BuildRequires: python-devel >= 1:2.7
24 BuildRequires: python-setuptools
26 BuildRequires: python-six
27 BuildRequires: python-zope.exceptions
28 BuildRequires: python-zope.interface
29 BuildRequires: python-zope.testing
33 BuildRequires: python3 >= 1:3.5
34 BuildRequires: python3-devel >= 1:3.5
35 BuildRequires: python3-setuptools
37 BuildRequires: python3-six
38 BuildRequires: python3-zope.exceptions
39 BuildRequires: python3-zope.interface
40 BuildRequires: python3-zope.testing
43 BuildRequires: rpm-pythonprov
44 BuildRequires: rpmbuild(macros) >= 1.714
46 BuildRequires: python3-sphinxcontrib-programoutput
47 BuildRequires: sphinx-pdg-3
49 Requires: python-modules >= 1:2.7
50 Requires: python-zope-base
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 This package provides a flexible test runner with layer support.
56 %description -l pl.UTF-8
57 Ten pakiet zapewnia elastyczne uruchamianie testów z obsługą warstw.
59 %package -n python3-zope.testrunner
60 Summary: Flexible test runner with layer support
61 Summary(pl.UTF-8): Elastyczne uruchamianie testów z obsługą warstw
62 Group: Libraries/Python
63 Requires: python3-modules >= 1:3.5
64 Requires: python3-zope-base
66 %description -n python3-zope.testrunner
67 This package provides a flexible test runner with layer support.
69 %description -n python3-zope.testrunner -l pl.UTF-8
70 Ten pakiet zapewnia elastyczne uruchamianie testów z obsługą warstw.
72 %package -n python3-zope.testrunner-examples
73 Summary: Example tests for zope.testrunner
74 Summary(pl.UTF-8): Przykładowe testy dla szkieletu zope.testrunner
75 Group: Development/Tools
76 Requires: python3-zope.testrunner = %{version}-%{release}
78 %description -n python3-zope.testrunner-examples
79 Example tests for zope.testrunner.
81 %description -n python3-zope.testrunner-examples -l pl.UTF-8
82 Przykładowe testy dla szkieletu zope.testrunner.
85 Summary: API documentation for Python zope.testrunner module
86 Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.testrunner
90 API documentation for Python zope.testrunner module.
92 %description apidocs -l pl.UTF-8
93 Dokumentacja API modułu Pythona zope.testrunner.
96 %setup -q -n zope.testrunner-%{version}
100 %py_build %{?with_tests:test}
104 %py3_build %{?with_tests:test}
108 PYTHONPATH=$(pwd)/src \
109 sphinx-build-3 -b html docs docs/_build/html
113 rm -rf $RPM_BUILD_ROOT
117 --install-purelib=%{py_sitedir}
120 # python2 test examples are useless because of postclean
121 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/zope/testrunner/tests
123 %{__mv} $RPM_BUILD_ROOT%{_bindir}/zope-testrunner{,-2}
128 --install-purelib=%{py3_sitedir}
130 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/testrunner/tests/*.{py,rst}
131 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/zope/testrunner/tests/__pycache__
132 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/zope/testrunner/tests/testrunner-ex*/__pycache__
133 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/zope/testrunner/tests/testrunner-ex*/*/__pycache__
134 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/zope/testrunner/tests/testrunner-ex*/*/*/__pycache__
136 %{__mv} $RPM_BUILD_ROOT%{_bindir}/zope-testrunner{,-3}
140 rm -rf $RPM_BUILD_ROOT
144 %defattr(644,root,root,755)
145 %doc CHANGES.rst COPYRIGHT.rst LICENSE.md README.rst
146 %attr(755,root,root) %{_bindir}/zope-testrunner-2
147 %{py_sitedir}/zope/testrunner
148 %{py_sitedir}/zope.testrunner-%{version}-py*.egg-info
149 %{py_sitedir}/zope.testrunner-%{version}-py*-nspkg.pth
153 %files -n python3-zope.testrunner
154 %defattr(644,root,root,755)
155 %doc CHANGES.rst COPYRIGHT.rst LICENSE.md README.rst
156 %attr(755,root,root) %{_bindir}/zope-testrunner-3
157 %dir %{py3_sitedir}/zope/testrunner
158 %{py3_sitedir}/zope/testrunner/*.py
159 %{py3_sitedir}/zope/testrunner/__pycache__
160 %{py3_sitedir}/zope.testrunner-%{version}-py*.egg-info
161 %{py3_sitedir}/zope.testrunner-%{version}-py*-nspkg.pth
163 %files -n python3-zope.testrunner-examples
164 %defattr(644,root,root,755)
165 %dir %{py3_sitedir}/zope/testrunner/tests
166 %{py3_sitedir}/zope/testrunner/tests/testrunner-ex*
171 %defattr(644,root,root,755)
172 %doc docs/_build/html/{_modules,_static,*.html,*.js}