]> git.pld-linux.org Git - packages/python-zope.testrunner.git/blame - python-zope.testrunner.spec
rebuild with python 3.10
[packages/python-zope.testrunner.git] / python-zope.testrunner.spec
CommitLineData
62ca82b4
JB
1#
2# Conditional build:
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
7
8Summary: Flexible test runner with layer support
9Summary(pl.UTF-8): Elastyczne uruchamianie testów z obsługą warstw
10Name: python-zope.testrunner
aff33c33 11Version: 5.4.0
cce8e425 12Release: 2
62ca82b4
JB
13License: ZPL v2.1
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/zope.testrunner/
16Source0: https://files.pythonhosted.org/packages/source/z/zope.testrunner/zope.testrunner-%{version}.tar.gz
aff33c33 17# Source0-md5: ae1320203ab70780632e030da50d82b0
62ca82b4
JB
18URL: https://www.zope.org/
19%if %{with python2}
20BuildRequires: python >= 1:2.7
21BuildRequires: python-devel >= 1:2.7
22BuildRequires: python-setuptools
23%if %{with tests}
24BuildRequires: python-six
25BuildRequires: python-zope.exceptions
26BuildRequires: python-zope.interface
27BuildRequires: python-zope.testing
28%endif
29%endif
30%if %{with python3}
31BuildRequires: python3 >= 1:3.5
32BuildRequires: python3-devel >= 1:3.5
33BuildRequires: python3-setuptools
34%if %{with tests}
35BuildRequires: python3-six
36BuildRequires: python3-zope.exceptions
37BuildRequires: python3-zope.interface
38BuildRequires: python3-zope.testing
39%endif
40%endif
41BuildRequires: rpm-pythonprov
42BuildRequires: rpmbuild(macros) >= 1.714
43%if %{with doc}
44BuildRequires: python3-sphinxcontrib-programoutput
07aa6b48 45BuildRequires: python3-zope.exceptions
62ca82b4
JB
46BuildRequires: sphinx-pdg-3
47%endif
48Requires: python-modules >= 1:2.7
49Requires: python-zope-base
c8cf05a1 50BuildArch: noarch
62ca82b4
JB
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53%description
54This package provides a flexible test runner with layer support.
55
56%description -l pl.UTF-8
57Ten pakiet zapewnia elastyczne uruchamianie testów z obsługą warstw.
58
59%package -n python3-zope.testrunner
60Summary: Flexible test runner with layer support
61Summary(pl.UTF-8): Elastyczne uruchamianie testów z obsługą warstw
62Group: Libraries/Python
63Requires: python3-modules >= 1:3.5
64Requires: python3-zope-base
65
66%description -n python3-zope.testrunner
67This package provides a flexible test runner with layer support.
68
69%description -n python3-zope.testrunner -l pl.UTF-8
70Ten pakiet zapewnia elastyczne uruchamianie testów z obsługą warstw.
71
72%package -n python3-zope.testrunner-examples
73Summary: Example tests for zope.testrunner
74Summary(pl.UTF-8): Przykładowe testy dla szkieletu zope.testrunner
75Group: Development/Tools
6516a601 76Requires: python3-zope.testrunner = %{version}-%{release}
62ca82b4
JB
77
78%description -n python3-zope.testrunner-examples
79Example tests for zope.testrunner.
80
81%description -n python3-zope.testrunner-examples -l pl.UTF-8
82Przykładowe testy dla szkieletu zope.testrunner.
83
84%package apidocs
85Summary: API documentation for Python zope.testrunner module
86Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.testrunner
87Group: Documentation
88
89%description apidocs
90API documentation for Python zope.testrunner module.
91
92%description apidocs -l pl.UTF-8
93Dokumentacja API modułu Pythona zope.testrunner.
94
95%prep
96%setup -q -n zope.testrunner-%{version}
97
98%build
99%if %{with python2}
100%py_build %{?with_tests:test}
101%endif
102
103%if %{with python3}
104%py3_build %{?with_tests:test}
105%endif
106
107%if %{with doc}
108PYTHONPATH=$(pwd)/src \
109sphinx-build-3 -b html docs docs/_build/html
110%endif
111
112%install
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%py_install \
c8cf05a1 117 --install-purelib=%{py_sitescriptdir}
62ca82b4
JB
118
119%py_postclean
120# python2 test examples are useless because of postclean
c8cf05a1 121%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/testrunner/tests
62ca82b4
JB
122
123%{__mv} $RPM_BUILD_ROOT%{_bindir}/zope-testrunner{,-2}
124%endif
125
126%if %{with python3}
127%py3_install \
c8cf05a1 128 --install-purelib=%{py3_sitescriptdir}
62ca82b4 129
c8cf05a1
JR
130%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testrunner/tests/*.{py,rst}
131%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testrunner/tests/__pycache__
132%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testrunner/tests/testrunner-ex*/__pycache__
133%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testrunner/tests/testrunner-ex*/*/__pycache__
134%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/testrunner/tests/testrunner-ex*/*/*/__pycache__
62ca82b4
JB
135
136%{__mv} $RPM_BUILD_ROOT%{_bindir}/zope-testrunner{,-3}
137%endif
138
139%clean
140rm -rf $RPM_BUILD_ROOT
141
142%if %{with python2}
143%files
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
c8cf05a1
JR
147%{py_sitescriptdir}/zope/testrunner
148%{py_sitescriptdir}/zope.testrunner-%{version}-py*.egg-info
149%{py_sitescriptdir}/zope.testrunner-%{version}-py*-nspkg.pth
62ca82b4
JB
150%endif
151
152%if %{with python3}
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
c8cf05a1
JR
157%dir %{py3_sitescriptdir}/zope/testrunner
158%{py3_sitescriptdir}/zope/testrunner/*.py
159%{py3_sitescriptdir}/zope/testrunner/__pycache__
160%{py3_sitescriptdir}/zope.testrunner-%{version}-py*.egg-info
161%{py3_sitescriptdir}/zope.testrunner-%{version}-py*-nspkg.pth
62ca82b4
JB
162
163%files -n python3-zope.testrunner-examples
164%defattr(644,root,root,755)
c8cf05a1
JR
165%dir %{py3_sitescriptdir}/zope/testrunner/tests
166%{py3_sitescriptdir}/zope/testrunner/tests/testrunner-ex*
62ca82b4
JB
167%endif
168
169%if %{with doc}
170%files apidocs
171%defattr(644,root,root,755)
172%doc docs/_build/html/{_modules,_static,*.html,*.js}
173%endif
This page took 0.080774 seconds and 4 git commands to generate.