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 module zope.exceptions
9 Summary: Zope Exceptions
10 Summary(pl.UTF-8): Zope Exceptions - wyjątki Zope
11 Name: python-%{module}
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/zope-exceptions/
17 Source0: https://files.pythonhosted.org/packages/source/z/zope.exceptions/zope.exceptions-%{version}.tar.gz
18 # Source0-md5: fac94f92c787cf9870e9e3fdfe247aa4
19 URL: https://www.zope.org/
21 BuildRequires: python >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-zope.interface
25 BuildRequires: python-zope.testrunner
29 BuildRequires: python3 >= 1:3.4
30 BuildRequires: python3-setuptools
32 BuildRequires: python3-zope.interface
33 BuildRequires: python3-zope.testrunner
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.714
39 BuildRequires: sphinx-pdg-3
40 BuildRequires: python3-repoze.sphinx.autointerface
42 Requires: python-modules >= 1:2.7
43 Requires: python-zope-base
44 Obsoletes: Zope-Exceptions
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 This package contains exception exceptions and implementations which
49 are so general purpose that they don't belong in Zope
50 application-specific packages.
52 %description -l pl.UTF-8
53 Ten pakiet zawiera wyjątki oraz implementacje wyjątków, mających na
54 tyle ogólne zastosowanie, że nie należą do żadnego z pakietów Zope
55 specyficznych dla aplikacji.
57 %package -n python3-%{module}
58 Summary: Zope Exceptions
59 Summary(pl.UTF-8): Zope Exceptions - wyjątki Zope
60 Group: Libraries/Python
61 Requires: python3-modules >= 1:3.4
62 Requires: python3-zope-base
64 %description -n python3-%{module}
65 This package contains exception exceptions and implementations which
66 are so general purpose that they don't belong in Zope
67 application-specific packages.
69 %description -n python3-%{module} -l pl.UTF-8
70 Ten pakiet zawiera wyjątki oraz implementacje wyjątków, mających na
71 tyle ogólne zastosowanie, że nie należą do żadnego z pakietów Zope
72 specyficznych dla aplikacji.
75 %setup -q -n zope.exceptions-%{version}
82 %{__python} -m zope.testrunner --test-path=src
90 %{__python3} -m zope.testrunner --test-path=src
95 %{__make} -C docs html \
96 SPHINXBUILD=sphinx-build-2
100 rm -rf $RPM_BUILD_ROOT
104 --install-purelib=%{py_sitedir}
110 --install-purelib=%{py3_sitedir}
114 rm -rf $RPM_BUILD_ROOT
118 %defattr(644,root,root,755)
119 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
120 %{py_sitedir}/zope/exceptions
121 %{py_sitedir}/zope.exceptions-%{version}-py*.egg-info
122 %{py_sitedir}/zope.exceptions-%{version}-py*-nspkg.pth
126 %files -n python3-%{module}
127 %defattr(644,root,root,755)
128 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
129 %{py3_sitedir}/zope/exceptions
130 %{py3_sitedir}/zope.exceptions-%{version}-py*.egg-info
131 %{py3_sitedir}/zope.exceptions-%{version}-py*-nspkg.pth