a240f2b
%{!?_licensedir:%global license %%doc}
a240f2b
%global pypi_name os-client-config
7e1289d
7e1289d
%if 0%{?fedora}
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}
Alan Pevec 944a970
Version:        1.16.0
Alan Pevec 944a970
Release:        1%{?dist}
Alan Pevec e1f2b37
Summary:        OpenStack Client Configuration Library
7e1289d
License:        ASL 2.0
a240f2b
URL:            https://github.com/openstack/%{pypi_name}
a240f2b
Source0:        https://pypi.python.org/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
7e1289d
BuildRequires:  python-setuptools
7e1289d
BuildRequires:  python-pbr
Alan Pevec 944a970
Alan Pevec 944a970
# Testing requirements
7e1289d
BuildRequires:  python-fixtures
Alan Pevec 944a970
BuildRequires:  python-glanceclient >= 0.18.0
Alan Pevec 944a970
BuildRequires:  python-jsonschema >= 2.0.0
Alan Pevec 944a970
BuildRequires:  python-keystoneclient >= 1.1.0
Alan Pevec d311929
BuildRequires:  python-oslotest >= 1.10.0
7e1289d
Alan Pevec 944a970
# Requirements
Alan Pevec 944a970
BuildRequires:  python-appdirs >= 1.3.0
Alan Pevec 944a970
BuildRequires:  python-keystoneauth1 >= 2.1.0
Alan Pevec 944a970
BuildRequires:  python-requestsexceptions >= 1.1.1
Alan Pevec 944a970
BuildRequires:  PyYAML >= 3.1.0
Alan Pevec 944a970
Alan Pevec 944a970
Requires:       python-appdirs >= 1.3.0
Alan Pevec 944a970
Requires:       python-keystoneauth1 >= 2.1.0
Alan Pevec 944a970
Requires:       python-requestsexceptions >= 1.1.1
Alan Pevec 944a970
Requires:       PyYAML >= 3.1.0
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
a240f2b
BuildRequires:  python-sphinx
a240f2b
BuildRequires:  python-oslo-sphinx
Alan Pevec 944a970
BuildRequires:  python-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
Alan Pevec 944a970
BuildRequires:  python3-keystoneauth1 >= 2.1.0
Alan Pevec 944a970
BuildRequires:  python3-requestsexceptions >= 1.1.1
Alan Pevec 944a970
BuildRequires:  python3-PyYAML >= 3.1.0
Alan Pevec 944a970
Alan Pevec 944a970
Requires:       python3-appdirs >= 1.3.0
Alan Pevec 944a970
Requires:       python3-keystoneauth1 >= 2.1.0
Alan Pevec 944a970
Requires:       python3-requestsexceptions >= 1.1.1
Alan Pevec 944a970
Requires:       python3-PyYAML >= 3.1.0
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
Alan Pevec 944a970
%{__python} setup.py build_sphinx
Alan Pevec 944a970
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
Alan Pevec 944a970
%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
Alan Pevec 944a970
%doc doc/build/html
7e1289d
%endif
7e1289d
7e1289d
%changelog
Alan Pevec 944a970
* Tue Mar 08 2016 Paul Belanger <pabelanger@redhat.com> - 1.16.0-1
Alan Pevec 944a970
- Update to 1.16.0
Alan Pevec 944a970
44460e8
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.4-4
44460e8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
44460e8
8578bdc
* Thu Nov 19 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.7.4-3
8578bdc
- Added few missing BuildRequires: for python3 subpackage
8578bdc
629b30f
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.4-2
629b30f
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
629b30f
Alan Pevec f95cb2e
* Mon Sep 21 2015 Alan Pevec <alan.pevec@redhat.com> 1.7.4-1
Alan Pevec f95cb2e
- Update to upstream 1.7.4
Alan Pevec f95cb2e
Alan Pevec d311929
* Mon Sep 21 2015 Alan Pevec <alan.pevec@redhat.com> 1.7.3-1
Alan Pevec d311929
- Update to upstream 1.7.3
Alan Pevec d311929
b4e1a72
* Fri Sep 18 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.7.1-1
b4e1a72
- Update to 1.7.1 version
b4e1a72
8c1007b
* Thu Sep 03 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.6.3-2
8c1007b
- Add explicit Provides: python-os-client-config for CBS Cloud buildroot
8c1007b
- also add missing python_provide macro for -doc subpackages
8c1007b
- Use pypi_name macro wherever possible
8c1007b
0bb0adf
* Thu Sep 03 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.6.3-1
0bb0adf
- Update to 1.6.3 version
0bb0adf
a240f2b
* Thu Sep 03 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.2.0-3
a240f2b
- Try to follow some new snippets from Python guidelines
a240f2b
7e1289d
* Sat Aug 01 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.2.0-2
7e1289d
- enable python3 version
7e1289d
- Add missing Requires: python3-appdirs
7e1289d
- enable tests
7e1289d
7e1289d
* Mon Jul 27 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.2.0-1
7e1289d
- Initial packaging