File python-novaclient.spec of Package python-novaclient

#
# spec file for package python-novaclient
#
# Copyright (c) 2017 SUSE LINUX 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-novaclient
Version:        6.0.2
Release:        0
Summary:        Python API and CLI for OpenStack Nova
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http:///launchpad.net/{name}
Source0:        https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz
Patch1:         novaclient-fallback-apidisccovery.diff
BuildRequires:  openssl
BuildRequires:  openstack-macros
BuildRequires:  python-cinderclient >= 1.6.0
BuildRequires:  python-devel
BuildRequires:  python-fixtures >= 3.0.0
BuildRequires:  python-glanceclient >= 2.3.0
BuildRequires:  python-keystoneclient >= 2.0.0
BuildRequires:  python-mock >= 2.0
BuildRequires:  python-os-client-config >= 1.13.1
BuildRequires:  python-pbr >= 1.6
BuildRequires:  python-requests-mock >= 1.0
BuildRequires:  python-setuptools >= 16.0
BuildRequires:  python-testrepository >= 0.0.18
BuildRequires:  python-testscenarios >= 0.4
BuildRequires:  python-testtools >= 1.4.0
Requires:       openssl
Requires:       python-Babel >= 2.3.4
Requires:       python-PrettyTable >= 0.7
Requires:       python-iso8601 >= 0.1.11
Requires:       python-keystoneauth1 >= 2.10.0
Requires:       python-oslo.i18n >= 2.1.0
Requires:       python-oslo.serialization >= 1.10.0
Requires:       python-oslo.utils >= 3.16.0
Requires:       python-pbr >= 1.6
Requires:       python-requests >= 2.10.0
Requires:       python-setuptools >= 16.0
Requires:       python-simplejson >= 2.2.0
Requires:       python-six >= 1.9.0
BuildArch:      noarch

%description
This is a client for the OpenStack Nova API. There's a Python API (the
novaclient module), and a command-line script (nova). Each implements 100% of
the OpenStack Nova API.

%package doc
Summary:        Documentation for OpenStack Nova API Client
Group:          Documentation
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx >= 2.5.0
BuildRequires:  python-reno >= 1.8.0

%description      doc
This is a client for the OpenStack Nova API. There's a Python API (the
novaclient module), and a command-line script (nova). Each implements 100% of
the OpenStack Nova API.

This package contains auto-generated documentation.

%package test
Summary:        Testsuite for OpenStack Nova API Client
Group:          Development/Languages/Python
Requires:       %{name} = %{version}
Requires:       python-fixtures >= 3.0.0
Requires:       python-glanceclient >= 2.3.0
Requires:       python-keystoneclient >= 2.0.0
Requires:       python-mock >= 2.0
Requires:       python-os-client-config >= 1.13.1
Requires:       python-requests-mock >= 1.0
Requires:       python-testrepository >= 0.0.18
Requires:       python-testscenarios >= 0.4
Requires:       python-testtools >= 1.4.0

%description      test
This is a client for the OpenStack Nova API. There's a Python API (the
novaclient module), and a command-line script (nova). Each implements 100% of
the OpenStack Nova API.

This package contains the testsuite.

%prep
# % autosetup -n %{name}-%{version}
#cd %{name}-%{version}
%setup -q -n %{name}-%{version}
%patch1 -p1

%build
%py2_build

%install
%py2_install

%{__python2} setup.py build_sphinx
# Fix hidden-file-or-dir warnings
rm -fr html/.doctrees html/.buildinfo

# handle the test subpackage
%openstack_test_package_install novaclient

%check
OS_TEST_PATH=novaclient/tests/unit %{__python2} setup.py testr

%files
%doc README.rst
%license LICENSE
%{_bindir}/nova
%{python2_sitelib}/novaclient
%{python2_sitelib}/*.egg-info

%files doc
%doc doc/build/html
%license LICENSE

%files test
%license LICENSE
%openstack_test_package_dir

%changelog