%global sname os-client-config %bcond_with test %bcond_with docs Name: {{ py2name('os-client-config') }} Version: 1.29.0 Release: 0 Summary: OpenStack Client Configuration Library License: {{ license('Apache-2.0') }} Group: Development/Languages/Python URL: https://launchpad.net/%{sname} Source0: https://files.pythonhosted.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz BuildRequires: openstack-macros BuildRequires: {{ py2pkg('devel', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('pbr', py_versions=['py2', 'py3']) }} BuildRequires: {{ py2pkg('setuptools', py_versions=['py2', 'py3']) }} Requires: {{ py2pkg('PyYAML') }} Requires: {{ py2pkg('appdirs') }} Requires: {{ py2pkg('keystoneauth1') }} Requires: {{ py2pkg('requestsexceptions') }} BuildArch: noarch %if %{with test} BuildRequires: {{ py2pkg('extras') }} BuildRequires: {{ py2pkg('fixtures') }} BuildRequires: {{ py2pkg('python-glanceclient') }} BuildRequires: {{ py2pkg('jsonschema') }} BuildRequires: {{ py2pkg('python-keystoneclient') }} BuildRequires: {{ py2pkg('mock') }} BuildRequires: {{ py2pkg('oslotest') }} BuildRequires: {{ py2pkg('python-subunit') }} BuildRequires: {{ py2pkg('testrepository') }} BuildRequires: {{ py2pkg('testscenarios') }} BuildRequires: {{ py2pkg('testtools') }} %endif %python_subpackages %description 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 BuildRequires: {{ py2pkg('Sphinx') }} BuildRequires: {{ py2pkg('openstackdocstheme') }} BuildRequires: {{ py2pkg('reno') }} %description -n python-os-client-config-doc Documentation for the os-client-config library. %endif %prep %autosetup -n %{sname}-%{version} %py_req_cleanup sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg %build %python_build %if %{with docs} # generate html docs %{__python2} setup.py build_sphinx # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %endif %install %python_install %if %{with test} %check export PYTHONPATH="%{python2_sitearch}:%{python2_sitelib}:%{buildroot}%{python2_sitelib}" testr init && testr run %endif %files %{python_files} %license LICENSE %doc README.rst %{python_sitelib}/os_client_config %{python_sitelib}/*.egg-info %if %{with docs} %files -n python-os-client-config-doc %doc doc/build/html %license LICENSE %endif %changelog