File python-quantumclient.spec of Package python-quantumclient

#
# spec file for package python-quantumclient
#
# Copyright (c) 2012 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/
#


%define component quantumclient

Name:           python-quantumclient
Version:        2.1.22.g2693515+git.1357543818.2693515
Release:        0
License:        Apache-2.0
Summary:        Openstack Network (Quantum) API Client
Url:            http://launchpad.net/python-quantumclient
Group:          Development/Languages/Python
Source:         python-quantumclient-master.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-base
BuildRequires:  python-distribute
Requires:       python >= 2.6.8
# /usr/bin/nova uses pkg_resources, thus:
Requires:       python-distribute
Requires:       python-Paste
Requires:       python-PasteDeploy
Requires:       python-python-gflags
Requires:       python-webob
Requires:       python-cliff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%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

%description
This is a client for the OpenStack Quantum API. There's a Python API (the
quantumclient module), and a command-line tool (quantum).

%package test
Summary:        Openstack Network (Quantum) API Client - Testsuite
Group:          System/Management
Requires:       %{name} = %{version}
# this shouldn't be required, but it's imported by test_lib.py
Requires:       openstack-quantum
# this shouldn't be required, but we get this ImportError currently:
# from quantum.tests.unit.client_tools import stubs as client_stubs
# ImportError: No module named tests.unit.client_tools
Requires:       openstack-quantum-test
Requires:       python-cliff-tablib >= 1.0
Requires:       python-mox
Requires:       python-nose
Requires:       python-nose-exclude
Requires:       python-nosexcover
Requires:       python-openstack.nose_plugin
Requires:       python-nosehtmloutput
Requires:       python-pep8

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

%prep
%setup -q -n python-quantumclient-2.1.22.g2693515
%openstack_cleanup_prep

%build
python setup.py build
# Just a small index.rst so far, so no need to build the doc
#python setup.py build_sphinx
#python setup.py build_sphinx -b man

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

### test subpackage
%openstack_test_package_install

%files
%defattr(-,root,root,-)
%doc LICENSE README
%doc doc/source/index.rst
%{_bindir}/quantum
%{python_sitelib}/%{component}/
%{python_sitelib}/python_%{component}-*.egg-info
# Part of test subpackage
%exclude %{python_sitelib}/%{component}/tests/

%files test
%defattr(-,root,root,-)
%{python_sitelib}/%{component}/tests/
%{_localstatedir}/lib/%{name}-test/

%changelog
openSUSE Build Service is sponsored by