File python-rpyc.spec of Package python-rpyc

#
# spec file for package python-rpyc
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-rpyc
Version:        3.4.4
Release:        0
Summary:        Remote Python Call (RPyC), a RPC library
License:        MIT
Group:          Development/Languages/Python
Url:            https://github.com/tomerfiliba/rpyc
Source:         https://files.pythonhosted.org/packages/source/r/rpyc/rpyc-%{version}.tar.gz
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
# SECTION test requirements
BuildRequires:  %{python_module nose}
BuildRequires:  %{python_module plumbum}
# /SECTION
Requires:       python-plumbum
BuildArch:      noarch
Requires(post):   update-alternatives
Requires(postun):  update-alternatives

%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}

%build
%python_build

%install
%python_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

%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}/*

%changelog
openSUSE Build Service is sponsored by