]> git.pld-linux.org Git - packages/python-zope.proxy.git/blame - python-zope.proxy.spec
rebuild with tests and docs
[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 12Version: 4.5.0
d00d7991 13Release: 4
01703bdf 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
1dd5fa5d 45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
13781963 48Proxies are special objects which serve as mostly-transparent wrappers
ede1d7e1
JB
49around another object, intervening in the apparent behavior of the
50wrapped object only when necessary to apply the policy (e.g., access
51checking, location brokering, etc.) for which the proxy is
52responsible.
53
54%description -l pl.UTF-8
55Proxy to specjalne obiekty służące jako prawie przezroczyste
56obudowanie innego obiektu, wkraczające w zwykłe zachowanie
57obudowywanego obiektu tylko w razie potrzeby, aby zastosować politykę
58(np. kontrolę dostępu, pośredniczenie itp.), za którą odpowiada proxy.
1dd5fa5d 59
01703bdf
JB
60%package -n python3-%{module}
61Summary: Mostly-transparent wrappers around another object
62Summary(pl.UTF-8): Prawie przezroczyste obudowywanie innych obiektów
63Group: Libraries/Python
64Requires: python3-modules >= 1:3.5
65
66%description -n python3-%{module}
67Proxies are special objects which serve as mostly-transparent wrappers
68around another object, intervening in the apparent behavior of the
69wrapped object only when necessary to apply the policy (e.g., access
70checking, location brokering, etc.) for which the proxy is
71responsible.
72
73%description -n python3-%{module} -l pl.UTF-8
74Proxy to specjalne obiekty służące jako prawie przezroczyste
75obudowanie innego obiektu, wkraczające w zwykłe zachowanie
76obudowywanego 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
80Summary: API documentation for Python zope.proxy module
81Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.proxy
82Group: Documentation
83
84%description apidocs
85API documentation for Python zope.proxy module.
86
87%description apidocs -l pl.UTF-8
88Dokumentacja API modułu Pythona zope.proxy.
89
1dd5fa5d 90%prep
01703bdf 91%setup -q -n %{module}-%{version}
1dd5fa5d 92
93%build
01703bdf 94%if %{with python2}
d145681d 95%py_build
1dd5fa5d 96
01703bdf
JB
97%if %{with tests}
98PYTHONPATH=$(pwd)/src \
99zope-testrunner-2 --test-path=src -v
100%endif
101%endif
102
103%if %{with python3}
104%py3_build
105
106%if %{with tests}
107PYTHONPATH=$(pwd)/src \
108zope-testrunner-3 --test-path=src -v
109%endif
110%endif
111
112%if %{with doc}
113PYTHONPATH=$(pwd)/src \
114%{__make} -C docs html \
115 SPHINXBUILD=sphinx-build-3
116%endif
117
1dd5fa5d 118%install
119rm -rf $RPM_BUILD_ROOT
120
01703bdf 121%if %{with python2}
d145681d 122%py_install
1dd5fa5d 123
ede1d7e1 124%py_postclean
01703bdf
JB
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
1dd5fa5d 139
140%clean
141rm -rf $RPM_BUILD_ROOT
142
01703bdf 143%if %{with python2}
1dd5fa5d 144%files
145%defattr(644,root,root,755)
01703bdf 146%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
cb65fed5 147%dir %{py_sitedir}/zope/proxy
cb65fed5
JB
148%{py_sitedir}/zope/proxy/*.py[co]
149%attr(755,root,root) %{py_sitedir}/zope/proxy/_zope_proxy_proxy.so
ede1d7e1
JB
150%{py_sitedir}/zope.proxy-*.egg-info
151%{py_sitedir}/zope.proxy-*-nspkg.pth
01703bdf 152%endif
cb65fed5
JB
153
154# -devel?
155#%{py_incdir}/zope.proxy
01703bdf
JB
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.114721 seconds and 4 git commands to generate.