File python-troveclient.spec of Package python-troveclient
#
# spec file for package python-troveclient
#
# 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 http://bugs.opensuse.org/
#
%define component troveclient
Name: python-troveclient
Version: 1.0.7
Release: 0
Summary: Openstack Object DbaaS (Trove) API Client
License: Apache-2.0
Group: Development/Languages/Python
Url: http://launchpad.net/python-troveclient
Source: https://pypi.python.org/packages/source/p/python-troveclient/python-troveclient-%{version}.tar.gz
Source99: %name-rpmlintrc
# https://bugzilla.suse.com/show_bug.cgi?id=935390
# https://bugs.launchpad.net/trove/+bug/1333852
# https://review.openstack.org/#/c/123301/2
Patch1: 0001-Fallback-to-flavors-str_id-when-id-is-None.patch
BuildRequires: openstack-suse-macros
BuildRequires: python-pbr >= 0.5.21
# Documentation requirements:
BuildRequires: python-Sphinx
# Test requirements:
BuildRequires: python-Babel
BuildRequires: python-PrettyTable >= 0.6
BuildRequires: python-httplib2
BuildRequires: python-mock >= 1.0
BuildRequires: python-requests >= 1.1
BuildRequires: python-simplejson >= 2.0.9
BuildRequires: python-six
BuildRequires: python-testrepository >= 0.0.17
BuildRequires: python-testtools >= 0.9.32
#NOTE(saschpe): Compat client code, not used in production:
BuildRequires: python-httplib2
BuildRequires: python-lxml
#NOTE(saschpe): End Compat client code, not used in production:
Requires: python >= 2.6.8
Requires: python-PrettyTable >= 0.7
Requires: python-pbr >= 0.6
Requires: python-requests >= 1.2.1
Requires: python-simplejson >= 2.2
Requires: python-six >= 1.7
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: python-discover
Requires: python-argparse
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%py_requires
%else
BuildArch: noarch
%endif
Provides: %{name}-test = %{version}
#TODO(saschpe): Change back to '<' after next version update:
Obsoletes: %{name}-test <= %{version}
%description
Trove is an Incubated OpenStack project providing
Database as a Service for Openstack.
This package contains documentation files for openstack-trove.
%package doc
Summary: Openstack Object DbaaS (Nova) API Client - Documentation
Group: Documentation/HTML
Requires: %{name} = %{version}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q
%patch1 -p1
%openstack_cleanup_prep
%build
python setup.py build
python setup.py build_sphinx && rm doc/build/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%check
testr init && testr run
%files
%defattr(-,root,root,-)
%doc LICENSE README.rst
%{_bindir}/trove
%{python_sitelib}/%{component}/
%{python_sitelib}/python_%{component}-*.egg-info
%files doc
%defattr(-,root,root,-)
%doc LICENSE doc/build/html
%changelog