a240f2b
%{!?_licensedir:%global license %%doc}
a240f2b
%global pypi_name os-client-config
7e1289d
71d84a9
%if 0%{?fedora} >= 24
7e1289d
%global with_python3 1
7e1289d
%endif
7e1289d
Alan Pevec 944a970
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Alan Pevec 944a970
a240f2b
Name:           python-%{pypi_name}
e693c74
Version:        1.28.0
9a2e171
Release:        3%{?dist}
Alan Pevec e1f2b37
Summary:        OpenStack Client Configuration Library
7e1289d
License:        ASL 2.0
a240f2b
URL:            https://github.com/openstack/%{pypi_name}
71d84a9
Source0:        https://pypi.io/packages/source/o/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
7e1289d
a240f2b
BuildArch:      noarch
a240f2b
a240f2b
%description
a240f2b
The os-client-config is a library for collecting client configuration for
a240f2b
using an OpenStack cloud in a consistent and comprehensive manner. It
a240f2b
will find cloud config for as few as 1 cloud and as many as you want to
a240f2b
put in a config file. It will read environment variables and config files,
a240f2b
and it also contains some vendor specific default values so that you don't
a240f2b
have to know extra info to use OpenStack
a240f2b
a240f2b
* If you have a config file, you will get the clouds listed in it
a240f2b
* If you have environment variables, you will get a cloud named `envvars`
a240f2b
* If you have neither, you will get a cloud named `defaults` with base defaults
a240f2b
a240f2b
%package -n python2-%{pypi_name}
Alan Pevec 944a970
Summary:        %{summary}
a240f2b
%{?python_provide:%python_provide python2-%{pypi_name}}
Alan Pevec 6a2e7fc
Obsoletes: python-%{pypi_name} < 1.7.3
Alan Pevec b4234df
# compat for previous Delorean Trunk package
Alan Pevec b4234df
Provides:       os-client-config
8c1007b
Alan Pevec 944a970
BuildRequires:  git
7e1289d
BuildRequires:  python2-devel
a01c778
BuildRequires:  python2-setuptools
a01c778
BuildRequires:  python2-pbr
Alan Pevec 944a970
Alan Pevec 944a970
# Testing requirements
a01c778
BuildRequires:  python2-fixtures
a01c778
BuildRequires:  python2-glanceclient >= 0.18.0
a01c778
BuildRequires:  python2-jsonschema >= 2.0.0
a01c778
BuildRequires:  python2-keystoneclient >= 1.1.0
a01c778
BuildRequires:  python2-oslotest >= 1.10.0
7e1289d
Alan Pevec 944a970
# Requirements
a01c778
BuildRequires:  python2-appdirs >= 1.3.0
a01c778
BuildRequires:  python2-keystoneauth1 >= 3.1.0
a01c778
BuildRequires:  python2-requestsexceptions >= 1.2.0
a01c778
BuildRequires:  python2-pyyaml >= 3.10
Alan Pevec 944a970
a01c778
Requires:       python2-appdirs >= 1.3.0
a01c778
Requires:       python2-keystoneauth1 >= 3.1.0
a01c778
Requires:       python2-requestsexceptions >= 1.2.0
a01c778
Requires:       python2-pyyaml >= 3.10
7e1289d
8c1007b
%description -n python2-%{pypi_name}
7e1289d
The os-client-config is a library for collecting client configuration for
7e1289d
using an OpenStack cloud in a consistent and comprehensive manner. It
7e1289d
will find cloud config for as few as 1 cloud and as many as you want to
7e1289d
put in a config file. It will read environment variables and config files,
7e1289d
and it also contains some vendor specific default values so that you don't
7e1289d
have to know extra info to use OpenStack
7e1289d
7e1289d
* If you have a config file, you will get the clouds listed in it
7e1289d
* If you have environment variables, you will get a cloud named `envvars`
7e1289d
* If you have neither, you will get a cloud named `defaults` with base defaults
7e1289d
8c1007b
%package  -n python2-%{pypi_name}-doc
a240f2b
Summary:        Documentation for OpenStack os-client-config library
8c1007b
%{?python_provide:%python_provide python2-%{pypi_name}-doc}
8c1007b
a01c778
BuildRequires:  python2-sphinx
a01c778
BuildRequires:  python2-openstackdocstheme
a01c778
BuildRequires:  python2-reno
a240f2b
8c1007b
%description -n python2-%{pypi_name}-doc
7e1289d
Documentation for the os-client-config library.
7e1289d
a240f2b
7e1289d
%if 0%{?with_python3}
a240f2b
%package -n python3-%{pypi_name}
Alan Pevec 944a970
Summary:        %{summary}
a240f2b
%{?python_provide:%python_provide python3-%{pypi_name}}
7e1289d
BuildRequires:  python3-devel
7e1289d
BuildRequires:  python3-setuptools
7e1289d
BuildRequires:  python3-pbr
Alan Pevec 944a970
Alan Pevec 944a970
# Testing requirements
a61eecd
BuildRequires:  python3-fixtures
Alan Pevec 944a970
BuildRequires:  python3-jsonschema >= 2.0.0
Alan Pevec 944a970
BuildRequires:  python3-keystoneclient >= 2.1.0
8578bdc
BuildRequires:  python3-oslotest >= 1.10.0
7e1289d
Alan Pevec 944a970
# Requirements
Alan Pevec 944a970
BuildRequires:  python3-appdirs >= 1.3.0
e693c74
BuildRequires:  python3-keystoneauth1 >= 3.1.0
e693c74
BuildRequires:  python3-requestsexceptions >= 1.2.0
e693c74
BuildRequires:  python3-PyYAML >= 3.10
Alan Pevec 944a970
Alan Pevec 944a970
Requires:       python3-appdirs >= 1.3.0
e693c74
Requires:       python3-keystoneauth1 >= 3.1.0
e693c74
Requires:       python3-requestsexceptions >= 1.2.0
e693c74
Requires:       python3-PyYAML >= 3.10
7e1289d
a240f2b
%description -n python3-%{pypi_name}
7e1289d
The os-client-config is a library for collecting client configuration for
7e1289d
using an OpenStack cloud in a consistent and comprehensive manner. It
7e1289d
will find cloud config for as few as 1 cloud and as many as you want to
7e1289d
put in a config file. It will read environment variables and config files,
7e1289d
and it also contains some vendor specific default values so that you don't
7e1289d
have to know extra info to use OpenStack
7e1289d
7e1289d
* If you have a config file, you will get the clouds listed in it
7e1289d
* If you have environment variables, you will get a cloud named `envvars`
7e1289d
* If you have neither, you will get a cloud named `defaults` with base defaults
7e1289d
a240f2b
%package -n    python3-%{pypi_name}-doc
7e1289d
Summary:       Documentation for OpenStack os-client-config library
8c1007b
%{?python_provide:%python_provide python3-%{pypi_name}-doc}
Alan Pevec 6a2e7fc
Obsoletes: python-%{pypi_name}-doc < 1.7.3
8c1007b
7e1289d
BuildRequires: python3-sphinx
Alan Pevec e1f2b37
BuildRequires: python3-oslo-sphinx
7e1289d
a240f2b
%description -n python3-%{pypi_name}-doc
7e1289d
Documentation for the os-client-config library.
7e1289d
%endif
7e1289d
7e1289d
%prep
Alan Pevec 944a970
%autosetup -n %{pypi_name}-%{upstream_version} -S git
7e1289d
7e1289d
# Let RPM handle the dependencies
7e1289d
rm -f test-requirements.txt requirements.txt
7e1289d
7e1289d
%build
7e1289d
%py2_build
7e1289d
%if 0%{?with_python3}
7e1289d
%py3_build
7e1289d
%endif
7e1289d
7e1289d
%install
7e1289d
%py2_install
7e1289d
Alan Pevec 944a970
# generate html doc
e693c74
# %{__python2} setup.py build_sphinx -b html
e693c74
# rm -rf doc/build/html/.{doctrees,buildinfo} doc/build/html/objects.inv
7e1289d
7e1289d
%if 0%{?with_python3}
7e1289d
%py3_install
7e1289d
%endif
7e1289d
7e1289d
%check
Alan Pevec 944a970
%{__python2} setup.py testr
Alan Pevec 944a970
# cleanup testrepository
Alan Pevec 944a970
rm -rf .testrepository
7e1289d
%if 0%{?with_python3}
Alan Pevec 944a970
%{__python3} setup.py testr
7e1289d
%endif
7e1289d
8c1007b
%files -n python2-%{pypi_name}
7e1289d
%doc ChangeLog CONTRIBUTING.rst PKG-INFO README.rst
7e1289d
%license LICENSE
7e1289d
%{python2_sitelib}/os_client_config
7e1289d
%{python2_sitelib}/*.egg-info
7e1289d
8c1007b
%files -n python2-%{pypi_name}-doc
a240f2b
%license LICENSE
e693c74
# %doc doc/build/html
7e1289d
7e1289d
%if 0%{?with_python3}
a240f2b
%files -n python3-%{pypi_name}
7e1289d
%doc ChangeLog CONTRIBUTING.rst PKG-INFO README.rst
7e1289d
%license LICENSE
7e1289d
%{python3_sitelib}/os_client_config
7e1289d
%{python3_sitelib}/*.egg-info
7e1289d
a240f2b
%files -n python3-%{pypi_name}-doc
a240f2b
%license LICENSE
e693c74
# %doc doc/build/html
7e1289d
%endif
7e1289d
7e1289d
%changelog
9a2e171
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.28.0-3
9a2e171
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9a2e171
a01c778
* Fri Jan 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.28.0-2
a01c778
- Update Python 2 dependency declarations to new packaging standards
a01c778
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
a01c778
e693c74
* Fri Aug 11 2017 Alfredo Moralejo <amoralej@redhat.com> 1.28.0-1
e693c74
- Update to 1.28.0
1912658