[packages/python-Pyro4] - updated to 4.80, added python3- package, doc and tests
qboosh
qboosh at pld-linux.org
Tue Feb 9 22:12:27 CET 2021
commit 48543cf18a2ffc768224a1de1cd63ee45f735bb2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 9 22:12:53 2021 +0100
- updated to 4.80, added python3- package, doc and tests
python-Pyro4.spec | 153 ++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 127 insertions(+), 26 deletions(-)
---
diff --git a/python-Pyro4.spec b/python-Pyro4.spec
index 06169fd..d901d61 100644
--- a/python-Pyro4.spec
+++ b/python-Pyro4.spec
@@ -1,17 +1,48 @@
+# NOTE: tests spawn >128 processes (ulimit -u 256 is enough)
+#
+# Conditional build:
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # unit tests
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
%define module Pyro4
-Summary: Distributed object middleware for Python (RPC).
-Summary(pl.UTF-8): Oprogramowanie umożliwiające dystrybucję objektów w Pythonie (RPC).
+Summary: Distributed object middleware for Python (RPC)
+Summary(pl.UTF-8): Oprogramowanie umożliwiające dystrybucję obiektów w Pythonie (RPC)
Name: python-%{module}
-Version: 4.14
-Release: 2
+Version: 4.80
+Release: 1
License: MIT
Group: Development/Languages/Python
-Source0: http://pypi.python.org/packages/source/P/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5: ad096f8e2d58ecac402a58eb6d10531a
-URL: http://packages.python.org/Pyro4/
+#Source0Download: https://pypi.org/simple/Pyro4/
+Source0: https://files.pythonhosted.org/packages/source/P/Pyro4/%{module}-%{version}.tar.gz
+# Source0-md5: e31fc077e06de9fc0bb061e357401954
+URL: https://pypi.org/project/Pyro4/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+%if %{with tests}
+BuildRequires: python-cloudpickle
+BuildRequires: python-dill
+BuildRequires: python-selectors2
+BuildRequires: python-serpent >= 1.27
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.5
+%if %{with tests}
+BuildRequires: python3-cloudpickle
+BuildRequires: python3-dill
+BuildRequires: python3-serpent >= 1.27
+%endif
+%endif
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
-Requires: python-modules
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: sed >= 4.0
+%if %{with doc}
+BuildRequires: python3-sphinx_rtd_theme
+BuildRequires: sphinx-pdg-3 >= 1.5.3
+%endif
+Requires: python-modules >= 1:2.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -21,40 +52,110 @@ powerful Distributed Object Technology system written entirely in
Python, that is designed to be very easy to use.
%description -l pl.UTF-8
-Pyro jest skrótem od Pythonowe zdalne objekty. Jest zaawasowanym i
-poteżnym systemem zarządania zdalnymi objektami napisanym całkowice w
-Pythonie. Jest zaprojektowany aby być bardzo łatwym w użyciu.
+Pyro jest skrótem od Python Remote Objects (pythonowe zdalne objekty).
+Jest zaawasowanym i poteżnym systemem zarządania zdalnymi obiektami,
+napisanym całkowice w Pythonie. Jest zaprojektowany jako bardzo łatwy
+w użyciu.
+
+%package -n python3-%{module}
+Summary: Distributed object middleware for Python (RPC)
+Summary(pl.UTF-8): Oprogramowanie umożliwiające dystrybucję obiektów w Pythonie (RPC)
+Group: Development/Languages/Python
+Requires: python3-modules >= 1:3.5
+
+%description -n python3-%{module}
+Pyro is short for Python Remote Objects. It is an advanced and
+powerful Distributed Object Technology system written entirely in
+Python, that is designed to be very easy to use.
+
+%description -n python3-%{module} -l pl.UTF-8
+Pyro jest skrótem od Python Remote Objects (pythonowe zdalne objekty).
+Jest zaawasowanym i poteżnym systemem zarządania zdalnymi obiektami,
+napisanym całkowice w Pythonie. Jest zaprojektowany jako bardzo łatwy
+w użyciu.
%prep
%setup -q -n %{module}-%{version}
+# selectors2 is preferred over selectors34, update egg dependency accordingly
+%{__sed} -i -e 's/selectors34/selectors2/' setup.py
+
%build
+%if %{with python2}
%py_build
+%if %{with tests}
+cd tests
+PYTHONPATH=$(pwd)/../src \
+%{__python} run_testsuite.py
+cd ..
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+cd tests
+PYTHONPATH=$(pwd)/../src \
+%{__python3} run_testsuite.py
+cd ..
+%endif
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+ SPHINXBUILD=sphinx-build-3
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
%py_install
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+for bin in check-config flameserver httpgateway ns nsc test-echoserver ; do
+ %{__mv} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin}-2
+done
+
%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+
+for bin in check-config flameserver httpgateway ns nsc test-echoserver ; do
+ %{__mv} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin} $RPM_BUILD_ROOT%{_bindir}/pyro4-${bin}-3
+done
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
+%doc LICENSE README.md
+%attr(755,root,root) %{_bindir}/pyro4-check-config-2
+%attr(755,root,root) %{_bindir}/pyro4-flameserver-2
+%attr(755,root,root) %{_bindir}/pyro4-httpgateway-2
+%attr(755,root,root) %{_bindir}/pyro4-ns-2
+%attr(755,root,root) %{_bindir}/pyro4-nsc-2
+%attr(755,root,root) %{_bindir}/pyro4-test-echoserver-2
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
-%dir %{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/%{module}/*.py[co]
-%dir %{py_sitescriptdir}/%{module}/socketserver
-%{py_sitescriptdir}/%{module}/socketserver/*.py[co]
-%dir %{py_sitescriptdir}/%{module}/test
-%{py_sitescriptdir}/%{module}/test/*.py[co]
-%dir %{py_sitescriptdir}/%{module}/utils
-%{py_sitescriptdir}/%{module}/utils/*.py[co]
-
-
-%if "%{py_ver}" > "2.4"
-%{py_sitescriptdir}/%{module}-*.egg-info
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%attr(755,root,root) %{_bindir}/pyro4-check-config-3
+%attr(755,root,root) %{_bindir}/pyro4-flameserver-3
+%attr(755,root,root) %{_bindir}/pyro4-httpgateway-3
+%attr(755,root,root) %{_bindir}/pyro4-ns-3
+%attr(755,root,root) %{_bindir}/pyro4-nsc-3
+%attr(755,root,root) %{_bindir}/pyro4-test-echoserver-3
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-Pyro4.git/commitdiff/48543cf18a2ffc768224a1de1cd63ee45f735bb2
More information about the pld-cvs-commit
mailing list