File python-os-client-config.spec of Package python-os-client-config

# spec file for package python-os-client-config
# Copyright (c) 2018 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

%global sname os-client-config
%bcond_with test
%bcond_with docs
Name:           python-os-client-config
Version:        1.29.0
Release:        0
Summary:        OpenStack Client Configuration Library
License:        Apache-2.0
Group:          Development/Languages/Python
Url:  {sname}
BuildRequires:  openstack-macros
BuildRequires:  python-devel
BuildRequires:  python2-pbr >= 2.0.0
BuildRequires:  python2-setuptools >= 16.0
BuildRequires:  python3-devel
BuildRequires:  python3-pbr >= 2.0.0
BuildRequires:  python3-setuptools >= 16.0
Requires:       python-PyYAML >= 3.10
Requires:       python-appdirs >= 1.3.0
Requires:       python-keystoneauth1 >= 3.3.0
Requires:       python-requestsexceptions >= 1.2.0
BuildArch:      noarch
%if %{with test}
BuildRequires:  python-extras >= 1.0.0
BuildRequires:  python-fixtures >= 3.0.0
BuildRequires:  python-glanceclient >= 2.8.0
BuildRequires:  python-jsonschema >= 2.6.0
BuildRequires:  python-keystoneclient >= 3.8.0
BuildRequires:  python-mock >= 2.0.0
BuildRequires:  python-oslotest >= 3.2.0
BuildRequires:  python-python-subunit >= 1.0.0
BuildRequires:  python-testrepository >= 0.0.18
BuildRequires:  python-testscenarios >= 0.4
BuildRequires:  python-testtools >= 2.2.0

os-client-config is a library for collecting client configuration for
using an OpenStack cloud in a consistent and comprehensive manner.
It will find cloud config for as few as 1 cloud and as many as you want
to put in a config file. It will read environment variables and config
files, and it also contains some vendor specific default values so that
you don't have to know extra info to use OpenStack.

%if %{with docs}
%package -n python-os-client-config-doc
Summary:        Documentation for OpenStack client configuration library
Group:          Development/Languages/Python
BuildRequires:  python-Sphinx
BuildRequires:  python-openstackdocstheme >= 1.18.1
BuildRequires:  python-reno >= 2.5.0

%description -n python-os-client-config-doc
Documentation for the os-client-config library.

%autosetup -n %{sname}-%{version}
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg

%if %{with docs}
# generate html docs
%{__python2} build_sphinx
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}


%if %{with test}
export PYTHONPATH="%{python2_sitearch}:%{python2_sitelib}:%{buildroot}%{python2_sitelib}"
testr init && testr run

%files %{python_files}
%license LICENSE
%doc README.rst

%if %{with docs}
%files -n python-os-client-config-doc
%doc doc/build/html
%license LICENSE

openSUSE Build Service is sponsored by