3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests (installed package required)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module zope.proxy
9 Summary: Mostly-transparent wrappers around another object
10 Summary(pl.UTF-8): Prawie przezroczyste obudowywanie innych obiektów
11 Name: python-%{module}
15 Group: Libraries/Python
16 Source0: https://files.pythonhosted.org/packages/source/z/zope.proxy/zope.proxy-%{version}.tar.gz
17 # Source0-md5: f18df4454bd57e7352be922f7a43dffb
18 URL: https://www.zope.dev/
20 BuildRequires: python >= 1:2.7
21 BuildRequires: python-devel >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-zope.interface
25 BuildRequires: python-zope.testrunner
29 BuildRequires: python3 >= 1:3.5
30 BuildRequires: python3-devel >= 1:3.5
31 BuildRequires: python3-setuptools
33 BuildRequires: python3-zope.interface
34 BuildRequires: python3-zope.testrunner
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.714
40 BuildRequires: python3-repoze.sphinx.autointerface
41 BuildRequires: sphinx-pdg-3
43 Requires: python-modules >= 1:2.7
44 Obsoletes: Zope-Proxy < 3.5.0
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Proxies are special objects which serve as mostly-transparent wrappers
49 around another object, intervening in the apparent behavior of the
50 wrapped object only when necessary to apply the policy (e.g., access
51 checking, location brokering, etc.) for which the proxy is
54 %description -l pl.UTF-8
55 Proxy to specjalne obiekty służące jako prawie przezroczyste
56 obudowanie innego obiektu, wkraczające w zwykłe zachowanie
57 obudowywanego obiektu tylko w razie potrzeby, aby zastosować politykę
58 (np. kontrolę dostępu, pośredniczenie itp.), za którą odpowiada proxy.
60 %package -n python3-%{module}
61 Summary: Mostly-transparent wrappers around another object
62 Summary(pl.UTF-8): Prawie przezroczyste obudowywanie innych obiektów
63 Group: Libraries/Python
64 Requires: python3-modules >= 1:3.5
66 %description -n python3-%{module}
67 Proxies are special objects which serve as mostly-transparent wrappers
68 around another object, intervening in the apparent behavior of the
69 wrapped object only when necessary to apply the policy (e.g., access
70 checking, location brokering, etc.) for which the proxy is
73 %description -n python3-%{module} -l pl.UTF-8
74 Proxy to specjalne obiekty służące jako prawie przezroczyste
75 obudowanie innego obiektu, wkraczające w zwykłe zachowanie
76 obudowywanego obiektu tylko w razie potrzeby, aby zastosować politykę
77 (np. kontrolę dostępu, pośredniczenie itp.), za którą odpowiada proxy.
80 Summary: API documentation for Python zope.proxy module
81 Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.proxy
85 API documentation for Python zope.proxy module.
87 %description apidocs -l pl.UTF-8
88 Dokumentacja API modułu Pythona zope.proxy.
91 %setup -q -n %{module}-%{version}
98 PYTHONPATH=$(pwd)/src \
99 zope-testrunner-2 --test-path=src -v
107 PYTHONPATH=$(pwd)/src \
108 zope-testrunner-3 --test-path=src -v
113 PYTHONPATH=$(pwd)/src \
114 %{__make} -C docs html \
115 SPHINXBUILD=sphinx-build-3
119 rm -rf $RPM_BUILD_ROOT
125 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/proxy/*.[ch]
126 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/zope/proxy/tests
127 # or package to -devel?
128 %{__rm} $RPM_BUILD_ROOT%{py_incdir}/zope.proxy/proxy.h
134 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/proxy/*.[ch]
135 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/zope/proxy/tests
136 # or package to python3-%{module}-devel?
137 %{__rm} $RPM_BUILD_ROOT%{py3_incdir}/zope.proxy/proxy.h
141 rm -rf $RPM_BUILD_ROOT
145 %defattr(644,root,root,755)
146 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
147 %dir %{py_sitedir}/zope/proxy
148 %{py_sitedir}/zope/proxy/*.py[co]
149 %attr(755,root,root) %{py_sitedir}/zope/proxy/_zope_proxy_proxy.so
150 %{py_sitedir}/zope.proxy-*.egg-info
151 %{py_sitedir}/zope.proxy-*-nspkg.pth
155 #%{py_incdir}/zope.proxy
158 %files -n python3-%{module}
159 %defattr(644,root,root,755)
160 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
161 %dir %{py3_sitedir}/zope/proxy
162 %{py3_sitedir}/zope/proxy/*.py
163 %{py3_sitedir}/zope/proxy/__pycache__
164 %attr(755,root,root) %{py3_sitedir}/zope/proxy/_zope_proxy_proxy.cpython-*.so
165 %{py3_sitedir}/zope.proxy-*.egg-info
166 %{py3_sitedir}/zope.proxy-*-nspkg.pth
171 %defattr(644,root,root,755)
172 %doc docs/_build/html/{_modules,_static,*.html,*.js}