]> git.pld-linux.org Git - SPECS.git/blob - python-Pyro4.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / python-Pyro4.spec
1 # NOTE: tests spawn >128 processes (ulimit -u 256 is enough)
2 #
3 # Conditional build:
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
9
10 %define         module  Pyro4
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}
14 Version:        4.80
15 Release:        2
16 License:        MIT
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/
22 %if %{with python2}
23 BuildRequires:  python-modules >= 1:2.7
24 %if %{with tests}
25 BuildRequires:  python-cloudpickle
26 BuildRequires:  python-dill
27 BuildRequires:  python-msgpack
28 BuildRequires:  python-selectors2
29 BuildRequires:  python-serpent >= 1.27
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-modules >= 1:3.5
34 %if %{with tests}
35 BuildRequires:  python3-cloudpickle
36 BuildRequires:  python3-dill
37 BuildRequires:  python3-msgpack
38 BuildRequires:  python3-serpent >= 1.27
39 %endif
40 %endif
41 BuildRequires:  rpm-pythonprov
42 BuildRequires:  rpmbuild(macros) >= 1.714
43 BuildRequires:  sed >= 4.0
44 %if %{with doc}
45 BuildRequires:  python3-sphinx_rtd_theme
46 BuildRequires:  sphinx-pdg-3 >= 1.5.3
47 %endif
48 Requires:       python-modules >= 1:2.7
49 BuildArch:      noarch
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
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.
56
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
61 w użyciu.
62
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
68
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.
73
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
78 w użyciu.
79
80 %package apidocs
81 Summary:        API documentation for Python Pyro4 module
82 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona Pyro4
83 Group:          Documentation
84
85 %description apidocs
86 API documentation for Python Pyro4 module.
87
88 %description apidocs -l pl.UTF-8
89 Dokumentacja API modułu Pythona Pyro4.
90
91 %prep
92 %setup -q -n %{module}-%{version}
93
94 # selectors2 is preferred over selectors34, update egg dependency accordingly
95 %{__sed} -i -e 's/selectors34/selectors2/' setup.py
96
97 %if %{without tests_net}
98 %{__rm} tests/PyroTests/test_{naming,naming2,socket}.py
99 %endif
100
101 %build
102 %if %{with python2}
103 %py_build
104
105 %if %{with tests}
106 cd tests
107 PYTHONPATH=$(pwd)/../src \
108 %{__python} run_testsuite.py
109 cd ..
110 %endif
111 %endif
112
113 %if %{with python3}
114 %py3_build
115
116 %if %{with tests}
117 cd tests
118 PYTHONPATH=$(pwd)/../src \
119 %{__python3} run_testsuite.py
120 cd ..
121 %endif
122 %endif
123
124 %if %{with doc}
125 %{__make} -C docs html \
126         SPHINXBUILD=sphinx-build-3
127 %endif
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131
132 %if %{with python2}
133 %py_install
134
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
137 done
138
139 %py_postclean
140 %endif
141
142 %if %{with python3}
143 %py3_install
144
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
147 done
148 %endif
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %if %{with python2}
154 %files
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
165 %endif
166
167 %if %{with python3}
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
179 %endif
180
181 %if %{with doc}
182 %files apidocs
183 %defattr(644,root,root,755)
184 %doc build/sphinx/html/{_images,_static,api,*.html,*.js}
185 %endif
This page took 0.72133 seconds and 3 git commands to generate.