1 # TODO: finish docs build (requires Sphinx repoze.sphinx.autointerface extension)
4 %bcond_with doc # Sphinx documentation
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
7 %bcond_without tests # unit tests
9 %define module zope.interface
10 Summary: Python 'interface' concept implementation
11 Summary(pl.UTF-8): Implementacja interfejsów dla języka Python
12 Name: python-%{module}
16 Group: Libraries/Python
17 #Source0Download: https://pypi.org/simple/zope.interface/
18 Source0: https://files.pythonhosted.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
19 # Source0-md5: 7b669cd692d817772c61d2e3ad0f1e71
20 URL: http://docs.zope.org/zope.interface/
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.710
24 BuildRequires: python >= 1:2.7
25 BuildRequires: python-devel >= 1:2.7
26 BuildRequires: python-setuptools
27 %{?with_tests:BuildRequires: python-zope.event}
30 BuildRequires: python3 >= 1:3.4
31 BuildRequires: python3-devel >= 1:3.4
32 BuildRequires: python3-setuptools
33 %{?with_tests:BuildRequires: python3-zope.event}
36 BuildRequires: python3-repoze.sphinx.autointerface
37 BuildRequires: sphinx-pdg-3
39 Requires: python-modules >= 1:2.7
40 Requires: python-zope-base
41 Provides: ZopeInterface
42 Provides: Zope-Interface
43 Obsoletes: ZopeInterface
44 Obsoletes: Zope-Interface
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Python 'interface' concept implementation.
50 %description -l pl.UTF-8
51 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
54 %package -n python3-%{module}
55 Summary: Python 'interface' concept implementation
56 Summary(pl.UTF-8): Implementacja interfejsów dla języka Python
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.4
59 Requires: python3-zope-base
61 %description -n python3-%{module}
62 Python 'interface' concept implementation.
64 %description -n python3-%{module} -l pl.UTF-8
65 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
69 %setup -q -n %{module}-%{version}
73 %py_build %{?with_tests:test}
77 %py3_build %{?with_tests:test}
81 PYTHONPATH=$(pwd)/src \
82 %{__make} -C docs html \
83 SPHINXBUILD=sphinx-build-2
87 rm -rf $RPM_BUILD_ROOT
91 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/interface/*.c
99 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/interface/*.c
103 rm -rf $RPM_BUILD_ROOT
107 %defattr(644,root,root,755)
108 %doc CHANGES.rst COPYRIGHT.txt README.rst
109 %dir %{py_sitedir}/zope/interface
110 %{py_sitedir}/zope/interface/*.py[co]
111 %attr(755,root,root) %{py_sitedir}/zope/interface/_zope_interface_coptimizations.so
112 %{py_sitedir}/zope/interface/common
113 %{py_sitedir}/zope/interface/tests
114 %{py_sitedir}/zope.interface-%{version}-py*.egg-info
115 %{py_sitedir}/zope.interface-%{version}-py*-nspkg.pth
119 %files -n python3-%{module}
120 %defattr(644,root,root,755)
121 %doc CHANGES.rst COPYRIGHT.txt README.rst
122 %dir %{py3_sitedir}/zope/interface
123 %{py3_sitedir}/zope/interface/*.py
124 %{py3_sitedir}/zope/interface/__pycache__
125 %attr(755,root,root) %{py3_sitedir}/zope/interface/_zope_interface_coptimizations*.so
126 %{py3_sitedir}/zope/interface/common
127 %{py3_sitedir}/zope/interface/tests
128 %{py3_sitedir}/zope.interface-%{version}-py*.egg-info
129 %{py3_sitedir}/zope.interface-%{version}-py*-nspkg.pth