LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-openstackclient.spec of Package python-openstackclient (Project home:garloff:OTC:python-save)

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

Name:           python-%{component}
Version:        1.5.0
Release:        0
Summary:        OpenStack Unified Command Line Client
License:        Apache-2.0
Group:          Development/Languages/Python
Url:            http://launchpad.net/python-openstackclient
Source:         http://tarballs.openstack.org/python-openstackclient/python-openstackclient-%{version}.tar.gz
Patch1:		new-oslo.diff
Patch2:		openstack-volume-backport.diff
Patch3:		revert-log-util.diff
Patch12:	add-volume-list.diff
Patch22:	openstack-volume-15-172.diff
Patch32:	openstack-network-15-26.diff
Patch33:	openstack-common-command.diff
BuildRequires:  openstack-suse-macros
BuildRequires:  python-pbr >= 0.5.21
# Documentation requirements:
BuildRequires:  python-Sphinx
# Test requirements:
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires:  python-discover
%endif
BuildRequires:  python-Babel >= 1.3
BuildRequires:  python-cliff >= 1.4.3
BuildRequires:  python-glanceclient >= 0.13.0
BuildRequires:  python-keyring >= 1.6.1
BuildRequires:  python-keystoneclient >= 1.3.0
BuildRequires:  python-mock >= 1.0
BuildRequires:  python-mox3 >= 0.7.0
BuildRequires:  python-novaclient >= 2.15.0
BuildRequires:  python-pycrypto >= 2.6
BuildRequires:  python-requests >= 1.1
BuildRequires:  python-six >= 1.4.1
BuildRequires:  python-testrepository >= 0.0.17
BuildRequires:  python-testtools >= 0.9.32
Requires:       python-cinderclient >= 1.0.6
Requires:       python-cliff >= 1.4.3
Requires:       python-glanceclient >= 0.13.0
Requires:       python-keyring >= 1.6.1
Requires:       python-keystoneclient >= 1.3.0
Requires:       python-neutronclient >= 2.3.11
Requires:       python-novaclient >= 2.22.0
Requires:	python-os-client-config >= 1.11.0
Requires:	python-oslo.utils >= 1.4.0
Requires:       python-pbr >= 0.5.21
Requires:       python-pycrypto >= 2.6
Requires:       python-requests >= 1.5
Requires:       python-six >= 1.4.1
Requires:       python-stevedore >= 1.5.0


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()")}
%py_requires
%else
BuildArch:      noarch
%endif
Provides:       %{name}-test = %{version}
#TODO(saschpe): Change back to '<' after next version update:
Obsoletes:      %{name}-test <= %{version}

%description
A unified command-line client for OpenStack. Combines the
functionality of the individual OpenStack project clients.

%prep
%setup -q
#%patch1 -p1
#%patch2 -p0
#%patch3 -p1
#%patch12 -p1
%patch22 -p1
#%patch3 -p1
%patch32 -p1
%patch33 -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}
touch %{buildroot}/%{python_sitelib}/%{component}/volume/v2/__init__.py

%check
#testr init && testr run --parallel

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

%changelog