Blob Blame Raw
%global modname rpyc
%global with_python3 1

Name:           python-%{modname}
Version:        3.3.0
Release:        1%{?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
* 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