File python-heatclient.spec of Package python-heatclient

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

Name:           python-%{component}
Version:        0.1.0.2.gb1b5455+git.1357718178.b1b5455
Release:        0
License:        Apache-2.0
Summary:        Openstack Orchestration (Heat) API Client
Url:            http://launchpad.net/python-heatclient
Group:          Development/Languages/Python
Source:         python-heatclient-master.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-base
BuildRequires:  python-distribute
# Documentation build requirements:
BuildRequires:  python-httplib2
BuildRequires:  python-keystoneclient
BuildRequires:  python-prettytable
BuildRequires:  python-Sphinx
Requires:       python >= 2.6.8
Requires:       python-argparse
Requires:       python-prettytable >= 0.6
Requires:       python-keystoneclient >= 0.1.2
Requires:       python-warlock < 2
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 library for Heat built on the Heat orchestration API. It
provides a Python API (the heatclient module) and a command-line tool (heat).

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

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

%package test
Summary:        Openstack Orchestration (Heat) API Client - Testsuite
Group:          Development/Languages/Python
Requires:       %{name} = %{version}
Requires:       python-mox
Requires:       python-nose
Requires:       python-nose-exclude
Requires:       python-nosexcover
Requires:       python-openstack.nose_plugin
Requires:       python-nosehtmloutput
Requires:       python-setuptools-git >= 0.4

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

%prep
%setup -q -n python-heatclient-0.1.0.2.gb1b5455
%openstack_cleanup_prep
echo %{version} > heatclient/versioninfo

%build
python setup.py build
python setup.py build_sphinx
# Currently no man pages:
#python setup.py build_sphinx -b man
rm -rf doc/build/html/{.buildinfo,.doctrees}

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

### test subpackage
%openstack_test_package_install

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

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

%files test
%defattr(-,root,root,-)
%{_bindir}/heat
%{_localstatedir}/lib/%{name}-test/

%changelog
openSUSE Build Service is sponsored by