2012-10-31 10:14:47 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-glanceclient
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2012-11-08 13:43:10 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-10-31 10:14:47 +00:00
|
|
|
|
|
|
|
Name: python-glanceclient
|
2012-11-08 13:43:10 +00:00
|
|
|
Version: 2012.1+git.1342772303.71a0cae
|
2012-10-31 10:14:47 +00:00
|
|
|
Release: 0
|
|
|
|
License: Apache-2.0
|
|
|
|
Summary: Openstack Image (Glance) API Client Library
|
|
|
|
Url: https://github.com/openstack/python-glanceclient
|
|
|
|
Group: Development/Languages/Python
|
2012-11-08 13:43:10 +00:00
|
|
|
Source: %{name}-%{version}.tar.gz
|
2012-10-31 10:14:47 +00:00
|
|
|
# Patch-FIX-UPSTREAM: '--insecure' flag should be checked when talking to keystone
|
|
|
|
Patch0: honor-insecure-flag-keystone.patch
|
|
|
|
# Don't specify requires in setup.py
|
|
|
|
# https://bugs.launchpad.net/python-glanceclient/+bug/1032155
|
|
|
|
Patch1: glanceclient-setup-no-requires.patch
|
|
|
|
# PATCH-FIX-UPSTREAM add-handler-for-logger.patch bnc#780048 vuntz@suse.com -- Remove cryptic "No handlers could be found for logger" error message
|
|
|
|
Patch2: add-handler-for-logger.patch
|
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: python-distribute
|
|
|
|
Requires: python >= 2.6.8
|
|
|
|
# /usr/bin/glance uses pkg_resources, thus:
|
|
|
|
Requires: python-distribute
|
|
|
|
Requires: python-httplib2
|
|
|
|
Requires: python-prettytable
|
|
|
|
Requires: python-keystoneclient
|
|
|
|
Requires: python-warlock
|
|
|
|
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 for the Glance which uses the OpenStack Image API. There's
|
|
|
|
a Python API (the glanceclient module), and a command-line script (glance).
|
|
|
|
|
|
|
|
%package test
|
2012-11-08 13:43:10 +00:00
|
|
|
|
2012-10-31 10:14:47 +00:00
|
|
|
Summary: Openstack Image (Glance) API Client Library - Testsuite
|
|
|
|
Group: System/Management
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: python-mock
|
|
|
|
Requires: python-mox
|
|
|
|
Requires: python-nose
|
|
|
|
Requires: python-unittest2
|
|
|
|
|
|
|
|
%description test
|
|
|
|
The %{name} testsuite.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
sed -i "s/setuptools-git>=0.4//" setup.py # We don't need that
|
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
cd docs && sphinx-build -b html . build/html
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
|
|
|
|
# test package
|
|
|
|
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}-test
|
|
|
|
cp -av tests run_tests.sh %{buildroot}%{_localstatedir}/lib/%{name}-test
|
|
|
|
ln -s %{python_sitelib}/glanceclient %{buildroot}%{_localstatedir}/lib/%{name}-test/glanceclient
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc LICENSE README.rst
|
|
|
|
%{_bindir}/glance
|
|
|
|
%{python_sitelib}/glanceclient/
|
|
|
|
%{python_sitelib}/python_glanceclient-*.egg-info
|
|
|
|
|
|
|
|
%files test
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc HACKING.rst
|
|
|
|
%{_localstatedir}/lib/%{name}-test
|
|
|
|
|
|
|
|
%changelog
|