14
0
forked from pool/python-rpyc
Files
python-rpyc/python-rpyc.spec

110 lines
3.3 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package python-rpyc
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
Name: python-rpyc%{psuffix}
Version: 6.0.2
Release: 0
Summary: Remote Python Call (RPyC), a RPC library
License: MIT
Group: Development/Languages/Python
URL: https://github.com/tomerfiliba/rpyc
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
Source: https://github.com/tomerfiliba/rpyc/archive/%{version}.tar.gz
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-plumbum >= 1.2
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
%if %{with test}
BuildRequires: %{python_module gevent}
BuildRequires: %{python_module plumbum >= 1.2}
BuildRequires: %{python_module pytest}
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
BuildRequires: %{python_module rpyc = %{version}}
BuildRequires: gcc-c++
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
%endif
%python_subpackages
%description
RPyC (pronounced like "are-pie-see"), or Remote Python Call, is a
transparent library for symmetrical remote procedure calls,
clustering, and distributed-computing. RPyC makes use of
object-proxying, a technique that employs python's dynamic nature, to
overcome the physical boundaries between processes and computers, so
that remote objects can be manipulated as if they were local.
%prep
%setup -q -n rpyc-%{version}
# Replace hashbangs
sed -i -e "s|env python|python%{python_bin_suffix}|" rpyc/cli/rpyc_classic.py rpyc/cli/rpyc_registry.py
%build
%pyproject_wheel
%install
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
%if !%{with test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
mv %{buildroot}%{_bindir}/rpyc_classic.py %{buildroot}%{_bindir}/rpyc_classic
mv %{buildroot}%{_bindir}/rpyc_registry.py %{buildroot}%{_bindir}/rpyc_registry
%python_clone -a %{buildroot}%{_bindir}/rpyc_classic
%python_clone -a %{buildroot}%{_bindir}/rpyc_registry
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
%endif
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
%if %{with test}
%check
export PYTEST_ADDOPTS="--import-mode=importlib" PYTHONPATH="."
pushd tests
donttest="TestDeploy or TestUdpRegistry"
# Fails with python 3.11
donttest+=" or test_gdb"
%pytest -k "not ($donttest)"
popd
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
%endif
%if !%{with test}
%post
%{python_install_alternative rpyc_classic rpyc_registry}
%postun
%python_uninstall_alternative rpyc_classic
%files %{python_files}
%doc README.rst
%license LICENSE
%python_alternative %{_bindir}/rpyc_classic
%python_alternative %{_bindir}/rpyc_registry
%{python_sitelib}/rpyc
%{python_sitelib}/rpyc-%{version}.dist-info
Accepting request 705221 from home:mcalabkova:branches:devel:languages:python - update to 4.0.2 * fix default hostname for ipv6 in rpyc_classic.py * fix ThreadPoolServer not working 4.0.1 * fix ValueError during install due to absolute PATH in SOURCES.txt 4.0.0 (see upstream Release Change Log for more) * classic.teleport_function now executes the function in the connection’s namespace by default * Changed signature of Service.on_connect and on_disconnect, adding the connection as argument. * Changed signature of Service.__init__, removing the connection argument * no longer store connection as self._conn. * SlaveService is now split into two asymetric classes: SlaveService and MasterService. If you want old SlaveService behaviour, use ClassicService * Removed modules rpyc.experimental.splitbrain and rpyc.experimental.retunnel. * bin/rpyc_classic.py will bind to 127.0.0.1 instead of 0.0.0.0 by default * Exposed attributes no longer hide plain attributes if one otherwise has the required permissions to access the plain attribute. * teleported functions will now be defined by default in the globals dict * fix deadlock with connections talking to each other multithreadedly * handle timeouts cumulatively * fix __hash__ for netrefs * add gevent Server. For now, this requires using gevent.monkey.patch_all() before importing for rpyc. Client connections can already be made without further changes to rpyc, just using gevent’s monkey patching. * fix problem with MongoDB, or more generally any remote objects that have a catch-all __getattr__ OBS-URL: https://build.opensuse.org/request/show/705221 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rpyc?expand=0&rev=7
2019-05-24 11:56:01 +00:00
%endif
%changelog