1 # NOTE: tests spawn >128 processes (ulimit -u 256 is enough)
4 %bcond_without doc # Sphinx documentation
5 %bcond_without tests # unit tests
6 %bcond_with tests_net # unit tests requiring network access
7 %bcond_without python2 # CPython 2.x module
8 %bcond_without python3 # CPython 3.x module
11 Summary: Distributed object middleware for Python (RPC)
12 Summary(pl.UTF-8): Oprogramowanie umożliwiające dystrybucję obiektów w Pythonie (RPC)
13 Name: python-%{module}
17 Group: Development/Languages/Python
18 #Source0Download: https://pypi.org/simple/Pyro4/
19 Source0: https://files.pythonhosted.org/packages/source/P/Pyro4/%{module}-%{version}.tar.gz
20 # Source0-md5: e31fc077e06de9fc0bb061e357401954
21 URL: https://pypi.org/project/Pyro4/
23 BuildRequires: python-modules >= 1:2.7
25 BuildRequires: python-cloudpickle
26 BuildRequires: python-dill
27 BuildRequires: python-msgpack
28 BuildRequires: python-selectors2
29 BuildRequires: python-serpent >= 1.27
33 BuildRequires: python3-modules >= 1:3.5
35 BuildRequires: python3-cloudpickle
36 BuildRequires: python3-dill
37 BuildRequires: python3-msgpack
38 BuildRequires: python3-serpent >= 1.27
41 BuildRequires: rpm-pythonprov
42 BuildRequires: rpmbuild(macros) >= 1.714
43 BuildRequires: sed >= 4.0
45 BuildRequires: python3-sphinx_rtd_theme
46 BuildRequires: sphinx-pdg-3 >= 1.5.3
48 Requires: python-modules >= 1:2.7
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 Pyro is short for Python Remote Objects. It is an advanced and
54 powerful Distributed Object Technology system written entirely in
55 Python, that is designed to be very easy to use.
57 %description -l pl.UTF-8
58 Pyro jest skrótem od Python Remote Objects (pythonowe zdalne objekty).
59 Jest zaawasowanym i poteżnym systemem zarządania zdalnymi obiektami,
60 napisanym całkowice w Pythonie. Jest zaprojektowany jako bardzo łatwy
63 %package -n python3-%{module}
64 Summary: Distributed object middleware for Python (RPC)
65 Summary(pl.UTF-8): Oprogramowanie umożliwiające dystrybucję obiektów w Pythonie (RPC)
66 Group: Development/Languages/Python
67 Requires: python3-modules >= 1:3.5
69 %description -n python3-%{module}
70 Pyro is short for Python Remote Objects. It is an advanced and
71 powerful Distributed Object Technology system written entirely in
72 Python, that is designed to be very easy to use.
74 %description -n python3-%{module} -l pl.UTF-8
75 Pyro jest skrótem od Python Remote Objects (pythonowe zdalne objekty).
76 Jest zaawasowanym i poteżnym systemem zarządania zdalnymi obiektami,
77 napisanym całkowice w Pythonie. Jest zaprojektowany jako bardzo łatwy
81 Summary: API documentation for Python Pyro4 module
82 Summary(pl.UTF-8): Dokumentacja API modułu Pythona Pyro4
86 API documentation for Python Pyro4 module.
88 %description apidocs -l pl.UTF-8
89 Dokumentacja API modułu Pythona Pyro4.
92 %setup -q -n %{module}-%{version}
94 # selectors2 is preferred over selectors34, update egg dependency accordingly
95 %{__sed} -i -e 's/selectors34/selectors2/' setup.py
97 %if %{without tests_net}
98 %{__rm} tests/PyroTests/test_{naming,naming2,socket}.py
107 PYTHONPATH=$(pwd)/../src \
108 %{__python} run_testsuite.py
118 PYTHONPATH=$(pwd)/../src \
119 %{__python3} run_testsuite.py
125 %{__make} -C docs html \
126 SPHINXBUILD=sphinx-build-3
130 rm -rf $RPM_BUILD_ROOT
135 for bin in check-config flameserver httpgateway ns nsc test-echoserver ; do
136 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin}-2
145 for bin in check-config flameserver httpgateway ns nsc test-echoserver ; do
146 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin}-3
151 rm -rf $RPM_BUILD_ROOT
155 %defattr(644,root,root,755)
156 %doc LICENSE README.md
157 %attr(755,root,root) %{_bindir}/pyro4-check-config-2
158 %attr(755,root,root) %{_bindir}/pyro4-flameserver-2
159 %attr(755,root,root) %{_bindir}/pyro4-httpgateway-2
160 %attr(755,root,root) %{_bindir}/pyro4-ns-2
161 %attr(755,root,root) %{_bindir}/pyro4-nsc-2
162 %attr(755,root,root) %{_bindir}/pyro4-test-echoserver-2
163 %{py_sitescriptdir}/%{module}
164 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
168 %files -n python3-%{module}
169 %defattr(644,root,root,755)
170 %doc LICENSE README.md
171 %attr(755,root,root) %{_bindir}/pyro4-check-config-3
172 %attr(755,root,root) %{_bindir}/pyro4-flameserver-3
173 %attr(755,root,root) %{_bindir}/pyro4-httpgateway-3
174 %attr(755,root,root) %{_bindir}/pyro4-ns-3
175 %attr(755,root,root) %{_bindir}/pyro4-nsc-3
176 %attr(755,root,root) %{_bindir}/pyro4-test-echoserver-3
177 %{py3_sitescriptdir}/%{module}
178 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
183 %defattr(644,root,root,755)
184 %doc build/sphinx/html/{_images,_static,api,*.html,*.js}