3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define _enable_debug_packages 0
10 %define module zope.exceptions
11 Summary: Zope Exceptions
12 Summary(pl.UTF-8): Zope Exceptions - wyjątki Zope
13 Name: python-%{module}
17 Group: Libraries/Python
18 #Source0Download: https://pypi.org/simple/zope-exceptions/
19 Source0: https://files.pythonhosted.org/packages/source/z/zope.exceptions/zope.exceptions-%{version}.tar.gz
20 # Source0-md5: fac94f92c787cf9870e9e3fdfe247aa4
21 URL: https://www.zope.org/
23 BuildRequires: python >= 1:2.7
24 BuildRequires: python-setuptools
26 BuildRequires: python-zope.interface
27 BuildRequires: python-zope.testrunner
31 BuildRequires: python3 >= 1:3.4
32 BuildRequires: python3-setuptools
34 BuildRequires: python3-zope.interface
35 BuildRequires: python3-zope.testrunner
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.714
41 BuildRequires: sphinx-pdg-3
42 BuildRequires: python3-repoze.sphinx.autointerface
44 Requires: python-modules >= 1:2.7
45 Requires: python-zope-base
46 Obsoletes: Zope-Exceptions
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 This package contains exception exceptions and implementations which
52 are so general purpose that they don't belong in Zope
53 application-specific packages.
55 %description -l pl.UTF-8
56 Ten pakiet zawiera wyjątki oraz implementacje wyjątków, mających na
57 tyle ogólne zastosowanie, że nie należą do żadnego z pakietów Zope
58 specyficznych dla aplikacji.
60 %package -n python3-%{module}
61 Summary: Zope Exceptions
62 Summary(pl.UTF-8): Zope Exceptions - wyjątki Zope
63 Group: Libraries/Python
64 Requires: python3-modules >= 1:3.4
65 Requires: python3-zope-base
67 %description -n python3-%{module}
68 This package contains exception exceptions and implementations which
69 are so general purpose that they don't belong in Zope
70 application-specific packages.
72 %description -n python3-%{module} -l pl.UTF-8
73 Ten pakiet zawiera wyjątki oraz implementacje wyjątków, mających na
74 tyle ogólne zastosowanie, że nie należą do żadnego z pakietów Zope
75 specyficznych dla aplikacji.
78 Summary: API documentation for Python zope.exceptions module
79 Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.exceptions
83 API documentation for Python zope.exceptions module.
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API modułu Pythona zope.exceptions.
89 %setup -q -n zope.exceptions-%{version}
96 %{__python} -m zope.testrunner --test-path=src
104 %{__python3} -m zope.testrunner --test-path=src
109 %{__make} -C docs html \
110 SPHINXBUILD=sphinx-build
114 rm -rf $RPM_BUILD_ROOT
118 --install-purelib=%{py_sitescriptdir}
124 --install-purelib=%{py3_sitescriptdir}
128 rm -rf $RPM_BUILD_ROOT
132 %defattr(644,root,root,755)
133 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
134 %{py_sitescriptdir}/zope/exceptions
135 %{py_sitescriptdir}/zope.exceptions-%{version}-py*.egg-info
136 %{py_sitescriptdir}/zope.exceptions-%{version}-py*-nspkg.pth
140 %files -n python3-%{module}
141 %defattr(644,root,root,755)
142 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
143 %{py3_sitescriptdir}/zope/exceptions
144 %{py3_sitescriptdir}/zope.exceptions-%{version}-py*.egg-info
145 %{py3_sitescriptdir}/zope.exceptions-%{version}-py*-nspkg.pth
149 %defattr(644,root,root,755)
151 %doc docs/_build/html/{_static,*.html,*.js}