File python-ironicclient.spec of Package python-ironicclient

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


%define component ironicclient
%define version_unconverted 1.2.0

Name:           python-%{component}
Version:        1.2.0
Release:        0
Summary:        Openstack Bare Metal Deploy (Ironic) - API Client
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://launchpad.net/python-ironicclient
Source:         https://pypi.python.org/packages/source/p/python-ironicclient/python-ironicclient-%{version}.tar.gz
BuildRequires:  openstack-suse-macros
BuildRequires:  python-devel
BuildRequires:  python-pbr
# Documentation build requirements:
#BuildRequires:  python-Sphinx
# Test requirements:
BuildRequires:  python-PrettyTable
BuildRequires:  python-appdirs
BuildRequires:  python-dogpile.cache
BuildRequires:  python-fixtures >= 0.3.14
BuildRequires:  python-httplib2
BuildRequires:  python-httpretty
BuildRequires:  python-mock
BuildRequires:  python-openstackclient
BuildRequires:  python-os-testr
BuildRequires:  python-oslotest
BuildRequires:  python-python-subunit
BuildRequires:  python-requests-mock
BuildRequires:  python-six
BuildRequires:  python-tempest-lib
BuildRequires:  python-testrepository
BuildRequires:  python-testtools
Requires:       python-Babel >= 1.3
Requires:       python-PrettyTable >= 0.7
Requires:       python-appdirs >= 1.3.0
Requires:       python-cliff >= 1.15.0
Requires:       python-dogpile.cache >= 0.5.4
Requires:       python-httplib2 >= 0.7.5
Requires:       python-keystoneauth1 >= 2.1.0
Requires:       python-openstackclient >= 2.1.0
Requires:       python-oslo.i18n >= 2.1.0
Requires:       python-oslo.utils >= 3.5.0
Requires:       python-pbr >= 1.6
Requires:       python-requests >= 2.8.1
Requires:       python-six >= 1.9.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
This is a client library for Bare Metal provisioning for OpenStack. This
package provides a Python API (the ironicclient module) and a command-line tool (ironic).

%package doc
Summary:        Openstack Bare Metal Deploy (Ironic) - Documentation
Group:          Documentation/HTML
Requires:       %{name} = %{version}

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

%prep
%setup -q
%openstack_cleanup_prep
echo %{version} > ironicclient/versioninfo

%build
python setup.py build
#python setup.py build_sphinx && rm doc/build/html/.buildinfo

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

%check
python setup.py testr

%files
%defattr(-,root,root,-)
%doc LICENSE README.rst
%{_bindir}/ironic
%{python_sitelib}/%{component}/
%{python_sitelib}/python_%{component}-*.egg-info

%files doc
%defattr(-,root,root,-)
%doc LICENSE
#%doc doc/build/html

%changelog
openSUSE Build Service is sponsored by