]> git.pld-linux.org Git - packages/python-zope.proxy.git/blob - python-zope.proxy.spec
01d73994a20ad4e998ec2a8c7865da5d9ab37a85
[packages/python-zope.proxy.git] / python-zope.proxy.spec
1 #
2 # Conditional build:
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
7
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}
12 Version:        4.5.0
13 Release:        3
14 License:        ZPL v2.1
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/
19 %if %{with python2}
20 BuildRequires:  python >= 1:2.7
21 BuildRequires:  python-devel >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-zope.interface
25 BuildRequires:  python-zope.testrunner
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3 >= 1:3.5
30 BuildRequires:  python3-devel >= 1:3.5
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-zope.interface
34 BuildRequires:  python3-zope.testrunner
35 %endif
36 %endif
37 BuildRequires:  rpm-pythonprov
38 BuildRequires:  rpmbuild(macros) >= 1.714
39 %if %{with doc}
40 BuildRequires:  python3-repoze.sphinx.autointerface
41 BuildRequires:  sphinx-pdg-3
42 %endif
43 Requires:       python-modules >= 1:2.7
44 Obsoletes:      Zope-Proxy < 3.5.0
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
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
52 responsible.
53
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.
59
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
65
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
71 responsible.
72
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.
78
79 %package apidocs
80 Summary:        API documentation for Python zope.proxy module
81 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona zope.proxy
82 Group:          Documentation
83
84 %description apidocs
85 API documentation for Python zope.proxy module.
86
87 %description apidocs -l pl.UTF-8
88 Dokumentacja API modułu Pythona zope.proxy.
89
90 %prep
91 %setup -q -n %{module}-%{version}
92
93 %build
94 %if %{with python2}
95 %py_build
96
97 %if %{with tests}
98 PYTHONPATH=$(pwd)/src \
99 zope-testrunner-2 --test-path=src -v
100 %endif
101 %endif
102
103 %if %{with python3}
104 %py3_build
105
106 %if %{with tests}
107 PYTHONPATH=$(pwd)/src \
108 zope-testrunner-3 --test-path=src -v
109 %endif
110 %endif
111
112 %if %{with doc}
113 PYTHONPATH=$(pwd)/src \
114 %{__make} -C docs html \
115         SPHINXBUILD=sphinx-build-3
116 %endif
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120
121 %if %{with python2}
122 %py_install
123
124 %py_postclean
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
129 %endif
130
131 %if %{with python3}
132 %py3_install
133
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
138 %endif
139
140 %clean
141 rm -rf $RPM_BUILD_ROOT
142
143 %if %{with python2}
144 %files
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
152 %endif
153
154 # -devel?
155 #%{py_incdir}/zope.proxy
156
157 %if %{with python3}
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
167 %endif
168
169 %if %{with doc}
170 %files apidocs
171 %defattr(644,root,root,755)
172 %doc docs/_build/html/{_modules,_static,*.html,*.js}
173 %endif
This page took 0.240362 seconds and 2 git commands to generate.