]> git.pld-linux.org Git - packages/python-zope.proxy.git/blame - python-zope.proxy.spec
- updated to 4.5.0, added python3 module and apidocs
[packages/python-zope.proxy.git] / python-zope.proxy.spec
CommitLineData
01703bdf
JB
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
a9bc96c3 8%define module zope.proxy
13781963 9Summary: Mostly-transparent wrappers around another object
ede1d7e1 10Summary(pl.UTF-8): Prawie przezroczyste obudowywanie innych obiektów
a9bc96c3 11Name: python-%{module}
01703bdf
JB
12Version: 4.5.0
13Release: 1
14License: ZPL v2.1
13781963 15Group: Libraries/Python
01703bdf
JB
16Source0: https://files.pythonhosted.org/packages/source/z/zope.proxy/zope.proxy-%{version}.tar.gz
17# Source0-md5: f18df4454bd57e7352be922f7a43dffb
18URL: https://www.zope.dev/
19%if %{with python2}
20BuildRequires: python >= 1:2.7
21BuildRequires: python-devel >= 1:2.7
ecacf43c 22BuildRequires: python-setuptools
01703bdf
JB
23%if %{with tests}
24BuildRequires: python-zope.interface
25BuildRequires: python-zope.testrunner
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3 >= 1:3.5
30BuildRequires: python3-devel >= 1:3.5
31BuildRequires: python3-setuptools
32%if %{with tests}
33BuildRequires: python3-zope.interface
34BuildRequires: python3-zope.testrunner
35%endif
36%endif
ede1d7e1 37BuildRequires: rpm-pythonprov
01703bdf
JB
38BuildRequires: rpmbuild(macros) >= 1.714
39%if %{with doc}
40BuildRequires: python3-repoze.sphinx.autointerface
41BuildRequires: sphinx-pdg-3
42%endif
43Requires: python-modules >= 1:2.7
44Obsoletes: Zope-Proxy < 3.5.0
45BuildArch: noarch
1dd5fa5d 46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
13781963 49Proxies are special objects which serve as mostly-transparent wrappers
ede1d7e1
JB
50around another object, intervening in the apparent behavior of the
51wrapped object only when necessary to apply the policy (e.g., access
52checking, location brokering, etc.) for which the proxy is
53responsible.
54
55%description -l pl.UTF-8
56Proxy to specjalne obiekty służące jako prawie przezroczyste
57obudowanie innego obiektu, wkraczające w zwykłe zachowanie
58obudowywanego obiektu tylko w razie potrzeby, aby zastosować politykę
59(np. kontrolę dostępu, pośredniczenie itp.), za którą odpowiada proxy.
1dd5fa5d 60
01703bdf
JB
61%package -n python3-%{module}
62Summary: Mostly-transparent wrappers around another object
63Summary(pl.UTF-8): Prawie przezroczyste obudowywanie innych obiektów
64Group: Libraries/Python
65Requires: python3-modules >= 1:3.5
66
67%description -n python3-%{module}
68Proxies are special objects which serve as mostly-transparent wrappers
69around another object, intervening in the apparent behavior of the
70wrapped object only when necessary to apply the policy (e.g., access
71checking, location brokering, etc.) for which the proxy is
72responsible.
73
74%description -n python3-%{module} -l pl.UTF-8
75Proxy to specjalne obiekty służące jako prawie przezroczyste
76obudowanie innego obiektu, wkraczające w zwykłe zachowanie
77obudowywanego obiektu tylko w razie potrzeby, aby zastosować politykę
78(np. kontrolę dostępu, pośredniczenie itp.), za którą odpowiada proxy.
79
80%package apidocs
81Summary: API documentation for Python zope.proxy module
82Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.proxy
83Group: Documentation
84
85%description apidocs
86API documentation for Python zope.proxy module.
87
88%description apidocs -l pl.UTF-8
89Dokumentacja API modułu Pythona zope.proxy.
90
1dd5fa5d 91%prep
01703bdf 92%setup -q -n %{module}-%{version}
1dd5fa5d 93
94%build
01703bdf 95%if %{with python2}
d145681d 96%py_build
1dd5fa5d 97
01703bdf
JB
98%if %{with tests}
99PYTHONPATH=$(pwd)/src \
100zope-testrunner-2 --test-path=src -v
101%endif
102%endif
103
104%if %{with python3}
105%py3_build
106
107%if %{with tests}
108PYTHONPATH=$(pwd)/src \
109zope-testrunner-3 --test-path=src -v
110%endif
111%endif
112
113%if %{with doc}
114PYTHONPATH=$(pwd)/src \
115%{__make} -C docs html \
116 SPHINXBUILD=sphinx-build-3
117%endif
118
1dd5fa5d 119%install
120rm -rf $RPM_BUILD_ROOT
121
01703bdf 122%if %{with python2}
d145681d 123%py_install
1dd5fa5d 124
ede1d7e1 125%py_postclean
01703bdf
JB
126%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/proxy/*.[ch]
127%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/zope/proxy/tests
128# or package to -devel?
129%{__rm} $RPM_BUILD_ROOT%{py_incdir}/zope.proxy/proxy.h
130%endif
131
132%if %{with python3}
133%py3_install
134
135%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/proxy/*.[ch]
136%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/zope/proxy/tests
137# or package to python3-%{module}-devel?
138%{__rm} $RPM_BUILD_ROOT%{py3_incdir}/zope.proxy/proxy.h
139%endif
1dd5fa5d 140
141%clean
142rm -rf $RPM_BUILD_ROOT
143
01703bdf 144%if %{with python2}
1dd5fa5d 145%files
146%defattr(644,root,root,755)
01703bdf 147%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
cb65fed5 148%dir %{py_sitedir}/zope/proxy
cb65fed5
JB
149%{py_sitedir}/zope/proxy/*.py[co]
150%attr(755,root,root) %{py_sitedir}/zope/proxy/_zope_proxy_proxy.so
ede1d7e1
JB
151%{py_sitedir}/zope.proxy-*.egg-info
152%{py_sitedir}/zope.proxy-*-nspkg.pth
01703bdf 153%endif
cb65fed5
JB
154
155# -devel?
156#%{py_incdir}/zope.proxy
01703bdf
JB
157
158%if %{with python3}
159%files -n python3-%{module}
160%defattr(644,root,root,755)
161%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
162%dir %{py3_sitedir}/zope/proxy
163%{py3_sitedir}/zope/proxy/*.py
164%{py3_sitedir}/zope/proxy/__pycache__
165%attr(755,root,root) %{py3_sitedir}/zope/proxy/_zope_proxy_proxy.cpython-*.so
166%{py3_sitedir}/zope.proxy-*.egg-info
167%{py3_sitedir}/zope.proxy-*-nspkg.pth
168%endif
169
170%if %{with doc}
171%files apidocs
172%defattr(644,root,root,755)
173%doc docs/_build/html/{_modules,_static,*.html,*.js}
174%endif
This page took 0.102125 seconds and 4 git commands to generate.