File python-remoto.spec of Package python-remoto

#
# spec file for package python-remoto
#
# Copyright (c) 2014 SUSE LINUX Products 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 http://bugs.opensuse.org/
#


%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

Name:           python-remoto
Version:        0.0.19
Release:        0
Summary:        Remote command executor using ssh and Python in the remote end
License:        MIT
Group:          System/Filesystems
Url:            https://github.com/ceph/python-remoto
Source0:        %{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel
BuildRequires:  python-mock >= 1.0b1
BuildRequires:  python-setuptools
BuildRequires:  python-tox >= 1.2
BuildRequires:  python-virtualenv
%if 0%{?suse_version}
BuildRequires:  python-pytest >= 2.1.3
%else
BuildRequires:  pytest
%endif
BuildRequires:  python-execnet
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif
Requires:       python-execnet
Requires:       python-setuptools

%description
Remote command executor using ssh and Python in the remote end. This 
package is primarily built to support the ceph-deploy project.
python-remoto is built upon python-execnet which manages the 
connections and processes.

%prep
%setup -q
# setup.py normally pulls down the remoto source using git.
# Pre-populate the directory so that this step is avoided.
%setup -q -T -D -n %{name}-%{version}

%build
# force no new version of remoto
REMOTO_NO_VENDOR=no python setup.py build

%install
# force no new version of remoto
REMOTO_NO_VENDOR=no python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%check
# force no new version of remoto
REMOTO_NO_VENDOR=no python setup.py test

%files
%defattr(-,root,root,-)
%doc LICENSE README.rst CHANGELOG.rst
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by