File python-cinderclient.spec of Package python-cinderclient

# spec file for package python-cinderclient
# 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

%define component cinderclient

Name:           python-%{component}
Version:        1.0.9
Release:        0
Summary:        Openstack Block Storage (Cinder) API Client
License:        Apache-2.0
Group:          Development/Languages/Python
BuildRequires:  openstack-suse-macros
BuildRequires:  python-devel
BuildRequires:  python-pbr
# Documentation build requirements:
BuildRequires:  python-PrettyTable
BuildRequires:  python-Sphinx
BuildRequires:  python-requests
Requires:       python >= 2.6.8
Requires:       python-Babel >= 1.3
Requires:       python-PrettyTable >= 0.7
Requires:       python-pbr >= 0.5.21
Requires:       python-requests >= 1.1
Requires:       python-simplejson >= 2.0.9
Requires:       python-six >= 1.4.1
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
Requires:       python-argparse
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
BuildArch:      noarch

This is a client for the OpenStack Volume API. There's a Python API (the
cinderclient module), and a command-line script (cinder). Each implements 100%
of the OpenStack Volume API.

%package doc
Summary:        Openstack Block Storage (Cinder) API Client - Documentation
Group:          Documentation/HTML
Requires:       %{name} = %{version}

%description doc
This package contains documentation files for %{name}.

%package test
Summary:        Openstack Block Storage (Cinder) API Client - Testsuite
Group:          Development/Languages/Python
Requires:       %{name} = %{version}
%if 0%{?suse_version} <= 1110
Requires:       python-discover
Requires:       python-coverage >= 3.6
Requires:       python-fixtures >= 0.3.14
Requires:       python-hacking >= 0.8.0
Requires:       python-mock >= 1.0
Requires:       python-python-subunit
Requires:       python-testrepository >= 0.0.17
Requires:       python-testtools >= 0.9.32

%description test
This package contains testsuite files for %{name}.

%setup -q
echo %{version} > cinderclient/versioninfo

python build
python build_sphinx

python install --skip-build --prefix=%{_prefix} --root=%{buildroot}

rm doc/build/html/.buildinfo

### bash-completion
install -p -D -m 644 tools/cinder.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/

### test subpackage


%files doc
%doc LICENSE doc/build/html

%files test