Blob Blame Raw
%global modname rpyc
%global with_python3 1

Name:           python-%{modname}
Version:        3.3.0
Release:        7%{?dist}
Summary:        A Transparent, Symmetrical Python Library for Distributed-Computing
URL:            http://rpyc.wikidot.com/
License:        MIT
Group:          Development/Libraries
Source0:        http://pypi.python.org/packages/source/r/rpyc/rpyc-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
%endif
Requires:       python-plumbum

%description
RPyC, or Remote Python Call, is a transparent and symmetrical python library
for remote procedure calls, clustering and distributed-computing.
RPyC makes use of object-proxies, 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.

%if 0%{?with_python3}
%package -n python3-%{modname}
Summary:        A Transparent, Symmetrical Python Library for Distributed-Computing
Requires:       python3-plumbum

%description -n python3-%{modname}
RPyC, or Remote Python Call, is a transparent and symmetrical python library
for remote procedure calls, clustering and distributed-computing.
RPyC makes use of object-proxies, 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.
This package contains Python 3 build of rpyc.
%endif

%prep
%setup -q -n %{modname}-%{version}

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3

%build
%{__python} setup.py build

%if 0%{with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif

%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
for f in `find %{buildroot}%{_bindir} -type f`; do
  mv $f %{buildroot}%{_bindir}/python3-`basename $f`
done
%endif # with_python3

%{__python} setup.py install -O1 --skip-build --root="%{buildroot}" --prefix="%{_prefix}"
# the binaries should not have .py extension
mv %{buildroot}%{_bindir}/rpyc_classic.py %{buildroot}%{_bindir}/rpyc_classic
mv %{buildroot}%{_bindir}/rpyc_registry.py %{buildroot}%{_bindir}/rpyc_registry

%files
%{_bindir}/rpyc_*
%{python2_sitelib}/*

%if 0%{?with_python3}
%files -n python3-%{modname}
%{_bindir}/python3-rpyc_*
%{python3_sitelib}/*
%endif

%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 3.3.0-6
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri Nov 14 2014 Slavek Kabrda <bkabrda@redhat.com> - 3.3.0-1
- Update to 3.3.0

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Nov 05 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 3.2.2-1
- Update to 3.2.2.
- Specfile cleanup.

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sun Feb 20 2011 - Erez Shinan <erez27@gmail.com> - 3.0.7-1
- Initial release