3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 # NOTE: 'module' should match the python import path, not the egg name
7 %define module zope.interface
8 Summary: Python 'interface' concept implementation
9 Summary(pl.UTF-8): Implementacja interfejsów dla języka Python
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: https://files.pythonhosted.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
16 # Source0-md5: 7b669cd692d817772c61d2e3ad0f1e71
17 URL: http://docs.zope.org/zope.interface/
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.710
22 BuildRequires: python-devel
23 BuildRequires: python-setuptools
26 BuildRequires: python3
27 BuildRequires: python3-devel
28 BuildRequires: python3-setuptools
30 Requires: python-modules
31 Requires: python-zope-base
32 Provides: ZopeInterface
33 Provides: Zope-Interface
34 Obsoletes: ZopeInterface
35 Obsoletes: Zope-Interface
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 Python 'interface' concept implementation.
41 %description -l pl.UTF-8
42 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
45 %package -n python3-%{module}
46 Summary: Python 'interface' concept implementation
47 Summary(pl.UTF-8): Implementacja interfejsów dla języka Python
48 Group: Libraries/Python
49 Requires: python3-modules
50 Requires: python3-zope-base
52 %description -n python3-%{module}
53 Python 'interface' concept implementation.
55 %description -n python3-%{module} -l pl.UTF-8
56 Implementacja interfejsów (abstrakcyjnych reprezentacji klas) dla
60 %setup -q -n %{module}-%{version}
64 %py_build %{?with_tests:test}
68 %py3_build %{?with_tests:test}
72 rm -rf $RPM_BUILD_ROOT
76 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/interface/*.c
84 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/interface/*.c
88 rm -rf $RPM_BUILD_ROOT
92 %defattr(644,root,root,755)
94 %dir %{py_sitedir}/zope/interface
95 %{py_sitedir}/zope/interface/*.py[co]
96 %attr(755,root,root) %{py_sitedir}/zope/interface/_zope_interface_coptimizations.so
97 %{py_sitedir}/zope/interface/common
98 %{py_sitedir}/zope/interface/tests
99 %{py_sitedir}/zope.interface-*.egg-info
100 %{py_sitedir}/zope.interface-*-nspkg.pth
104 %files -n python3-%{module}
105 %defattr(644,root,root,755)
107 %dir %{py3_sitedir}/zope/interface
108 %{py3_sitedir}/zope/interface/*.py
109 %{py3_sitedir}/zope/interface/__pycache__
110 %attr(755,root,root) %{py3_sitedir}/zope/interface/_zope_interface_coptimizations*.so
111 %{py3_sitedir}/zope/interface/common
112 %{py3_sitedir}/zope/interface/tests
113 %{py3_sitedir}/zope.interface-*.egg-info
114 %{py3_sitedir}/zope.interface-*-nspkg.pth