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
a240f2b
Name:           python-%{pypi_name}
Alan Pevec f95cb2e
Version:        1.7.4
629b30f
Release:        2%{?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}
a240f2b
Summary:        OpenStack Client Configuation Library
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
7e1289d
BuildRequires:  python2-devel
7e1289d
BuildRequires:  python-setuptools
7e1289d
BuildRequires:  python-pbr
7e1289d
BuildRequires:  python-fixtures
Alan Pevec 7b449bb
BuildRequires:  python-appdirs
Alan Pevec d311929
BuildRequires:  python-oslotest >= 1.10.0
Alan Pevec 3b89d3f
BuildRequires:  python-keystoneclient >= 1.6.0
Alan Pevec cc932ec
BuildRequires:  PyYAML
7e1289d
7e1289d
Requires:       python-setuptools
7e1289d
Requires:       python-fixtures
7e1289d
Requires:       python-appdirs
Alan Pevec d311929
# TODO soft-deps
Alan Pevec d311929
#Requires:       python-keystoneauth1
Alan Pevec d311929
#Requires:       python-keystoneclient >= 1.6.0
Alan Pevec d311929
Requires:       PyYAML
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
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}
7e1289d
Summary:        OpenStack Client Configuation Library
a240f2b
%{?python_provide:%python_provide python3-%{pypi_name}}
7e1289d
BuildRequires:  python3-devel
7e1289d
BuildRequires:  python3-setuptools
7e1289d
BuildRequires:  python3-pbr
7e1289d
7e1289d
Requires:       python3-setuptools
7e1289d
Requires:       python3-fixtures
7e1289d
Requires:       python3-appdirs
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
7e1289d
%setup -qc
a240f2b
mv %{pypi_name}-%{version} python2
7e1289d
7e1289d
pushd python2
7e1289d
7e1289d
# Let RPM handle the dependencies
7e1289d
rm -f test-requirements.txt requirements.txt
7e1289d
7e1289d
cp -p LICENSE ChangeLog CONTRIBUTING.rst PKG-INFO README.rst ../
7e1289d
popd
7e1289d
7e1289d
%if 0%{?with_python3}
7e1289d
cp -a python2 python3
7e1289d
%endif
7e1289d
7e1289d
%build
7e1289d
pushd python2
7e1289d
%py2_build
7e1289d
popd
7e1289d
%if 0%{?with_python3}
7e1289d
pushd python3
7e1289d
%py3_build
7e1289d
popd
7e1289d
%endif
7e1289d
7e1289d
%install
7e1289d
pushd python2
7e1289d
%py2_install
7e1289d
export PYTHONPATH="$( pwd ):$PYTHONPATH"
7e1289d
pushd doc
7e1289d
sphinx-build -b html -d build/doctrees   source build/html
7e1289d
# Fix hidden-file-or-dir warnings
7e1289d
rm -fr build/html/.buildinfo
7e1289d
7e1289d
# Fix this rpmlint warning
7e1289d
sed -i "s|\r||g" build/html/_static/jquery.js
7e1289d
popd
7e1289d
popd
7e1289d
7e1289d
%if 0%{?with_python3}
7e1289d
pushd python3
7e1289d
%py3_install
7e1289d
export PYTHONPATH="$( pwd ):$PYTHONPATH"
7e1289d
pushd doc
7e1289d
sphinx-build-3 -b html -d build/doctrees   source build/html
7e1289d
7e1289d
# Fix hidden-file-or-dir warnings
7e1289d
rm -fr build/html/.buildinfo
7e1289d
7e1289d
# Fix this rpmlint warning
7e1289d
sed -i "s|\r||g" build/html/_static/jquery.js
7e1289d
popd
7e1289d
popd
7e1289d
%endif
7e1289d
7e1289d
%check
7e1289d
pushd python2
7e1289d
%{__python2} setup.py test
7e1289d
popd
7e1289d
7e1289d
%if 0%{?with_python3}
7e1289d
pushd python3
7e1289d
%{__python3} setup.py test
7e1289d
popd
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
7e1289d
%doc python2/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
7e1289d
%doc python3/doc/build/html
7e1289d
%endif
7e1289d
7e1289d
%changelog
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