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

# spec file for package python-os-client-config
# Copyright (c) 2020 SUSE LLC
# 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.31.2
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
BuildRequires:  python2-setuptools
BuildRequires:  python3-devel
BuildRequires:  python3-pbr
BuildRequires:  python3-setuptools
Requires:       python-PyYAML
Requires:       python-appdirs
Requires:       python-keystoneauth1
Requires:       python-requestsexceptions
BuildArch:      noarch
%if %{with test}
BuildRequires:  python-extras
BuildRequires:  python-fixtures
BuildRequires:  python-glanceclient
BuildRequires:  python-jsonschema
BuildRequires:  python-keystoneclient
BuildRequires:  python-mock
BuildRequires:  python-oslotest
BuildRequires:  python-python-subunit
BuildRequires:  python-testrepository
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools

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
BuildRequires:  python-reno

%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