File python-neutronclient.spec of Package python-neutronclient

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

Name:           python-neutronclient
Version:        2.3.12
Release:        0
Summary:        Openstack Network (Quantum) API Client
License:        Apache-2.0
Group:          Development/Languages/Python
Patch1:		new-oslo.diff
Patch2:		new-oslo2.diff
Patch3:		utils-str2dict-type.diff
Patch4:		no-routes.diff
Patch5:		no-allowed-adr-pairs.diff
BuildRequires:  openstack-suse-macros
BuildRequires:  python-devel
BuildRequires:  python-setuptools
# Documentation build requirements:
BuildRequires:  python-Sphinx
BuildRequires:  python-cliff >= 1.2.1
BuildRequires:  python-cliff-tablib
BuildRequires:  python-iso8601
BuildRequires:  python-mox3
BuildRequires:  python-nose
BuildRequires:  python-pbr
BuildRequires:  python-pyparsing >= 1.5.6
BuildRequires:  python-requests >= 1.1
BuildRequires:  python-simplejson
BuildRequires:  python-testrepository
BuildRequires:  python-testtools
BuildRequires:  python-oslosphinx
Requires:       python >= 2.6.8
Requires:       python-Babel >= 1.3
Requires:       python-argparse
Requires:       python-cliff >= 1.4.3
Requires:       python-iso8601 >= 0.1.9
Requires:       python-keystoneclient >= 0.9.0
Requires:       python-netaddr >= 0.7.6
Requires:       python-pbr >= 0.6
Requires:       python-requests >= 1.1
Requires:       python-simplejson >= 2.0.9
Requires:       python-six >= 1.6.0
Provides:       python-quantumclient =
Obsoletes:      python-quantumclient <
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()")}
BuildArch:      noarch

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

%package test

Summary:        Openstack Network (Quantum) API Client - Testsuite
Group:          System/Management
Provides:       python-quantumclient-test =
Obsoletes:      python-quantumclient-test <
Requires:       %{name} = %{version}
Requires:       python-cliff-tablib >= 1.0
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
Requires:       python-discover
Requires:       python-fixtures >= 0.3.14
Requires:       python-mox3 >= 0.5.3
Requires:       python-python-subunit >= 0.0.18
Requires:       python-testrepository >= 0.0.18
Requires:       python-testtools >= 0.9.34

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

%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

python build
python build_sphinx
rm doc/build/html/.buildinfo

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

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

### test subpackage

%doc LICENSE README.rst doc/build/html

%files test