]> git.pld-linux.org Git - packages/python-Pyro4.git/blame - python-Pyro4.spec
- package -apidocs
[packages/python-Pyro4.git] / python-Pyro4.spec
CommitLineData
48543cf1
JB
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_without python2 # CPython 2.x module
7%bcond_without python3 # CPython 3.x module
8
d67e26ec 9%define module Pyro4
48543cf1
JB
10Summary: Distributed object middleware for Python (RPC)
11Summary(pl.UTF-8): Oprogramowanie umożliwiające dystrybucję obiektów w Pythonie (RPC)
d67e26ec 12Name: python-%{module}
48543cf1
JB
13Version: 4.80
14Release: 1
d67e26ec
MK
15License: MIT
16Group: Development/Languages/Python
48543cf1
JB
17#Source0Download: https://pypi.org/simple/Pyro4/
18Source0: https://files.pythonhosted.org/packages/source/P/Pyro4/%{module}-%{version}.tar.gz
19# Source0-md5: e31fc077e06de9fc0bb061e357401954
20URL: https://pypi.org/project/Pyro4/
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.7
23%if %{with tests}
24BuildRequires: python-cloudpickle
25BuildRequires: python-dill
26BuildRequires: python-selectors2
27BuildRequires: python-serpent >= 1.27
28%endif
29%endif
30%if %{with python3}
31BuildRequires: python3-modules >= 1:3.5
32%if %{with tests}
33BuildRequires: python3-cloudpickle
34BuildRequires: python3-dill
35BuildRequires: python3-serpent >= 1.27
36%endif
37%endif
d67e26ec 38BuildRequires: rpm-pythonprov
48543cf1
JB
39BuildRequires: rpmbuild(macros) >= 1.714
40BuildRequires: sed >= 4.0
41%if %{with doc}
42BuildRequires: python3-sphinx_rtd_theme
43BuildRequires: sphinx-pdg-3 >= 1.5.3
44%endif
45Requires: python-modules >= 1:2.7
d67e26ec
MK
46BuildArch: noarch
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
50Pyro is short for Python Remote Objects. It is an advanced and
51powerful Distributed Object Technology system written entirely in
52Python, that is designed to be very easy to use.
53
54%description -l pl.UTF-8
48543cf1
JB
55Pyro jest skrótem od Python Remote Objects (pythonowe zdalne objekty).
56Jest zaawasowanym i poteżnym systemem zarządania zdalnymi obiektami,
57napisanym całkowice w Pythonie. Jest zaprojektowany jako bardzo łatwy
58w użyciu.
59
60%package -n python3-%{module}
61Summary: Distributed object middleware for Python (RPC)
62Summary(pl.UTF-8): Oprogramowanie umożliwiające dystrybucję obiektów w Pythonie (RPC)
63Group: Development/Languages/Python
64Requires: python3-modules >= 1:3.5
65
66%description -n python3-%{module}
67Pyro is short for Python Remote Objects. It is an advanced and
68powerful Distributed Object Technology system written entirely in
69Python, that is designed to be very easy to use.
70
71%description -n python3-%{module} -l pl.UTF-8
72Pyro jest skrótem od Python Remote Objects (pythonowe zdalne objekty).
73Jest zaawasowanym i poteżnym systemem zarządania zdalnymi obiektami,
74napisanym całkowice w Pythonie. Jest zaprojektowany jako bardzo łatwy
75w użyciu.
d67e26ec 76
347674c0
JB
77%package apidocs
78Summary: API documentation for Python Pyro4 module
79Summary(pl.UTF-8): Dokumentacja API modułu Pythona Pyro4
80Group: Documentation
81
82%description apidocs
83API documentation for Python Pyro4 module.
84
85%description apidocs -l pl.UTF-8
86Dokumentacja API modułu Pythona Pyro4.
87
d67e26ec
MK
88%prep
89%setup -q -n %{module}-%{version}
90
48543cf1
JB
91# selectors2 is preferred over selectors34, update egg dependency accordingly
92%{__sed} -i -e 's/selectors34/selectors2/' setup.py
93
d67e26ec 94%build
48543cf1 95%if %{with python2}
3bf6c317 96%py_build
d67e26ec 97
48543cf1
JB
98%if %{with tests}
99cd tests
100PYTHONPATH=$(pwd)/../src \
101%{__python} run_testsuite.py
102cd ..
103%endif
104%endif
105
106%if %{with python3}
107%py3_build
108
109%if %{with tests}
110cd tests
111PYTHONPATH=$(pwd)/../src \
112%{__python3} run_testsuite.py
113cd ..
114%endif
115%endif
116
117%if %{with doc}
118%{__make} -C docs html \
119 SPHINXBUILD=sphinx-build-3
120%endif
121
d67e26ec
MK
122%install
123rm -rf $RPM_BUILD_ROOT
48543cf1
JB
124
125%if %{with python2}
3bf6c317 126%py_install
d67e26ec 127
48543cf1
JB
128for bin in check-config flameserver httpgateway ns nsc test-echoserver ; do
129 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin}-2
130done
131
d67e26ec 132%py_postclean
48543cf1
JB
133%endif
134
135%if %{with python3}
136%py3_install
137
138for bin in check-config flameserver httpgateway ns nsc test-echoserver ; do
139 %{__mv} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin}-3
140done
141%endif
d67e26ec
MK
142
143%clean
144rm -rf $RPM_BUILD_ROOT
145
48543cf1 146%if %{with python2}
d67e26ec
MK
147%files
148%defattr(644,root,root,755)
48543cf1
JB
149%doc LICENSE README.md
150%attr(755,root,root) %{_bindir}/pyro4-check-config-2
151%attr(755,root,root) %{_bindir}/pyro4-flameserver-2
152%attr(755,root,root) %{_bindir}/pyro4-httpgateway-2
153%attr(755,root,root) %{_bindir}/pyro4-ns-2
154%attr(755,root,root) %{_bindir}/pyro4-nsc-2
155%attr(755,root,root) %{_bindir}/pyro4-test-echoserver-2
156%{py_sitescriptdir}/%{module}
157%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
158%endif
d67e26ec 159
48543cf1
JB
160%if %{with python3}
161%files -n python3-%{module}
162%defattr(644,root,root,755)
163%doc LICENSE README.md
164%attr(755,root,root) %{_bindir}/pyro4-check-config-3
165%attr(755,root,root) %{_bindir}/pyro4-flameserver-3
166%attr(755,root,root) %{_bindir}/pyro4-httpgateway-3
167%attr(755,root,root) %{_bindir}/pyro4-ns-3
168%attr(755,root,root) %{_bindir}/pyro4-nsc-3
169%attr(755,root,root) %{_bindir}/pyro4-test-echoserver-3
170%{py3_sitescriptdir}/%{module}
171%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
d67e26ec 172%endif
347674c0
JB
173
174%if %{with doc}
175%files apidocs
176%defattr(644,root,root,755)
177%doc build/sphinx/html/{_images,_static,api,*.html,*.js}
178%endif
This page took 0.102035 seconds and 4 git commands to generate.