3 %bcond_without doc # Sphinx documentation
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
6 %bcond_without tests # unit tests
8 %define module zope.interface
9 Summary: Python 'interface' concept implementation
10 Summary(pl.UTF-8): Implementacja interfejsów dla języka Python
11 Name: python-%{module}
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/zope.interface/
17 Source0: https://files.pythonhosted.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
18 # Source0-md5: 1bc66758275c5eb66d169acba3c8e50e
19 URL: https://zopeinterface.readthedocs.io/
21 BuildRequires: python >= 1:2.7
22 BuildRequires: python-devel >= 1:2.7
23 BuildRequires: python-setuptools
24 %{?with_tests:BuildRequires: python-zope.event}
27 BuildRequires: python3 >= 1:3.5
28 BuildRequires: python3-devel >= 1:3.5
29 BuildRequires: python3-setuptools
30 %{?with_tests:BuildRequires: python3-zope.event}
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.714
35 BuildRequires: python3-repoze.sphinx.autointerface
36 BuildRequires: sphinx-pdg-3
38 Requires: python-modules >= 1:2.7
39 Requires: python-zope-base
40 Provides: ZopeInterface
41 Provides: Zope-Interface
42 Obsoletes: ZopeInterface
43 Obsoletes: Zope-Interface
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Python 'interface' concept implementation.
49 %description -l pl.UTF-8
50 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
53 %package -n python3-%{module}
54 Summary: Python 'interface' concept implementation
55 Summary(pl.UTF-8): Implementacja interfejsów dla języka Python
56 Group: Libraries/Python
57 Requires: python3-modules >= 1:3.5
58 Requires: python3-zope-base
60 %description -n python3-%{module}
61 Python 'interface' concept implementation.
63 %description -n python3-%{module} -l pl.UTF-8
64 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
68 Summary: API documentation for Python zope.interface module
69 Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.interface
73 API documentation for Python zope.interface module.
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API modułu Pythona zope.interface.
79 %setup -q -n %{module}-%{version}
83 %py_build %{?with_tests:test}
87 %py3_build %{?with_tests:test}
91 PYTHONPATH=$(pwd)/src \
92 %{__make} -C docs html \
93 SPHINXBUILD=sphinx-build-3
97 rm -rf $RPM_BUILD_ROOT
101 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/interface/*.c
109 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/interface/*.c
113 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
118 %doc CHANGES.rst COPYRIGHT.txt README.rst
119 %dir %{py_sitedir}/zope/interface
120 %{py_sitedir}/zope/interface/*.py[co]
121 %attr(755,root,root) %{py_sitedir}/zope/interface/_zope_interface_coptimizations.so
122 %{py_sitedir}/zope/interface/common
123 %{py_sitedir}/zope/interface/tests
124 %{py_sitedir}/zope.interface-%{version}-py*.egg-info
125 %{py_sitedir}/zope.interface-%{version}-py*-nspkg.pth
129 %files -n python3-%{module}
130 %defattr(644,root,root,755)
131 %doc CHANGES.rst COPYRIGHT.txt README.rst
132 %dir %{py3_sitedir}/zope/interface
133 %{py3_sitedir}/zope/interface/*.py
134 %{py3_sitedir}/zope/interface/__pycache__
135 %attr(755,root,root) %{py3_sitedir}/zope/interface/_zope_interface_coptimizations*.so
136 %{py3_sitedir}/zope/interface/common
137 %{py3_sitedir}/zope/interface/tests
138 %{py3_sitedir}/zope.interface-%{version}-py*.egg-info
139 %{py3_sitedir}/zope.interface-%{version}-py*-nspkg.pth
144 %defattr(644,root,root,755)
145 %doc docs/_build/html/{_modules,_static,api,*.html,*.js}