File python-zaqarclient.spec of Package python-zaqarclient
#
# spec file for package python-zaqarclient
#
# 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 zaqarclient
Name: python-%{component}
Version: 1.2.0
Release: 0
Summary: Openstack Message Queue (Zaqar) API Client
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/stackforge/python-zaqarclient
Source: https://pypi.python.org/packages/source/p/python-zaqarclient/python-zaqarclient-%{version}.tar.gz
BuildRequires: openstack-suse-macros
BuildRequires: python-pbr >= 0.5.21
# Test requirements
BuildRequires: python-ddt
BuildRequires: python-fixtures >= 0.3.12
BuildRequires: python-jsonschema >= 1.3.0
BuildRequires: python-keystoneclient >= 0.4.1
BuildRequires: python-mock >= 0.8.0
#BuildRequires: python-nose
BuildRequires: python-nose-exclude
BuildRequires: python-openstack.nose_plugin >= 0.7
BuildRequires: python-os-client-config
BuildRequires: python-osc-lib
BuildRequires: python-python-subunit
BuildRequires: python-requests >= 1.1
BuildRequires: python-requests-mock
BuildRequires: python-six >= 1.3.0
BuildRequires: python-stevedore >= 0.10
BuildRequires: python-testrepository >= 0.0.13
BuildRequires: python-testtools >= 0.9.32
Requires: python-jsonschema >= 2.0.0
Requires: python-keystoneclient >= 2.0.0
Requires: python-osc-lib
Requires: python-oslo.i18n >= 2.1.0
Requires: python-oslo.utils
Requires: python-pbr >= 1.6
Requires: python-requests >= 2.10.0
Requires: python-six >= 1.9.0
Requires: python-stevedore >= 1.16.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()")}
%else
BuildArch: noarch
%endif
%description
This is a client for the OpenStack Zaqar API. There's a Python API
(the zaqarclient module), and a command-line tool (zaqar).
%prep
%setup -q
%openstack_cleanup_prep
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --install-data=%{python_sitelib}
%check
#NOTE(saschpe): Need access to site-lib, stevedore's entry-point based plugin loading mechanism
# won't find zaqarclient.transport plugins otherwise.
export PYTHONPATH=%{buildroot}%{python_sitelib}
nosetests
%files
%defattr(-,root,root,-)
%doc LICENSE README.rst
%{python_sitelib}/%{component}/
%{python_sitelib}/python_%{component}-*.egg-info
%changelog