File python-pysphere.spec of Package python-pysphere

#
# spec file for python-pysphere
#
# Copyright (c) 2013 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/
#

Name:           python-pysphere
Version:        0.1.8
Release:        1
License:        BSD-3-Clause
Summary:        Python API for interaction with the vSphere Web Services SDK
Url:            https://code.google.com/p/pysphere/
Group:          Development/Languages/Python
Source:         https://pysphere.googlecode.com/files/pysphere-%{version}.zip
BuildRequires:  python-devel
BuildRequires:  unzip
%if 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

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Python API for interaction with the vSphere Web Services SDK

Among other operations, it provides easy interfaces to:

  * Connect to VMWare's ESX, ESXi, Virtual Center, Virtual Server hosts
  * Query hosts, datacenters, resource pools, virtual machines
  * VM: Power on, power off, reset, revert to snapshot, get properties,
    update vmware tools, clone, migrate.
  * vSphere 5.0 Guest Operations: create/delete/move files and directories.
    Upload/download files from the guest system. List/start/stop processes 
    in the guest system.
  * Create and delete snapshots
  * Hosts statistics and performance monitoring 

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

%build
python setup.py build                                                                                                                                   

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%files
%defattr(-,root,root)
%doc CHANGES README
%{python_sitelib}

%changelog