b89800e
a240f2b
%{!?_licensedir:%global license %%doc}
a240f2b
%global pypi_name os-client-config
b89800e
%global with_doc 1
9bf267c
Alan Pevec 944a970
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Alan Pevec 944a970
b89800e
%global common_desc \
b89800e
The os-client-config is a library for collecting client configuration for \
b89800e
using an OpenStack cloud in a consistent and comprehensive manner. It \
b89800e
will find cloud config for as few as 1 cloud and as many as you want to \
b89800e
put in a config file. It will read environment variables and config files, \
b89800e
and it also contains some vendor specific default values so that you don't \
b89800e
have to know extra info to use OpenStack \
b89800e
 \
b89800e
* If you have a config file, you will get the clouds listed in it \
b89800e
* If you have environment variables, you will get a cloud named `envvars` \
b89800e
* If you have neither, you will get a cloud named `defaults` with base defaults
b89800e
a240f2b
Name:           python-%{pypi_name}
81179b3
Version:        2.1.0
c4cd4dc
Release:        2%{?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
Alan Pevec 944a970
BuildRequires:  git
Alan Pevec 944a970
b89800e
%description
b89800e
%{common_desc}
a240f2b
a240f2b
81179b3
%package -n python3-%{pypi_name}
Alan Pevec 944a970
Summary:        %{summary}
81179b3
%{?python_provide:%python_provide python3-%{pypi_name}}
b89800e
81179b3
BuildRequires:  python3-devel
81179b3
BuildRequires:  python3-setuptools
81179b3
BuildRequires:  python3-pbr
Alan Pevec 944a970
# Testing requirements
81179b3
BuildRequires:  python3-fixtures
81179b3
BuildRequires:  python3-stestr
81179b3
BuildRequires:  python3-glanceclient >= 0.18.0
81179b3
BuildRequires:  python3-openstacksdk
81179b3
BuildRequires:  python3-oslotest >= 1.10.0
81179b3
BuildRequires:  python3-jsonschema >= 2.6.0
7e1289d
81179b3
Requires:       python3-openstacksdk >= 0.13.0
7e1289d
7e1289d
81179b3
%description -n python3-%{pypi_name}
4a93b09
%{common_desc}
8c1007b
7e1289d
b89800e
%if 0%{?with_doc}
b89800e
%package  -n python-%{pypi_name}-doc
b89800e
Summary:        Documentation for OpenStack os-client-config library
b89800e
81179b3
BuildRequires:  python3-sphinx
81179b3
BuildRequires:  python3-openstackdocstheme
81179b3
BuildRequires:  python3-reno
b89800e
b89800e
%description -n python-%{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
81179b3
%{py3_build}
7e1289d
b89800e
%if 0%{?with_doc}
b89800e
# generate html doc
81179b3
sphinx-build-3 -b html doc/source/ doc/build/html
b89800e
rm -rf doc/build/html/.{doctrees,buildinfo} doc/build/html/objects.inv
9bf267c
%endif
7e1289d
b89800e
%install
81179b3
%{py3_install}
7e1289d
b89800e
%check
b89800e
# NOTE(jpena): we are disabling Python2 unit tests when building the Python 3 package.
b89800e
# The reason is that unit tests require glanceclient, and glanceclient is python3-only
b89800e
# when building with Python 3. We could revert that, but it is a rabbit hole we do not
b89800e
# want to enter
b89800e
export OS_TEST_PATH='./os_client_config/tests'
b89800e
export PATH=$PATH:$RPM_BUILD_ROOT/usr/bin
b89800e
export PYTHONPATH=$PWD
b89800e
4a93b09
#rm -rf .stestr
81179b3
#PYTHON=python3 stestr-3 --test-path $OS_TEST_PATH run
7e1289d
81179b3
%files -n python3-%{pypi_name}
7e1289d
%doc ChangeLog CONTRIBUTING.rst PKG-INFO README.rst
7e1289d
%license LICENSE
81179b3
%{python3_sitelib}/os_client_config
81179b3
%{python3_sitelib}/*.egg-info
7e1289d
b89800e
%if 0%{?with_doc}
b89800e
%files -n python-%{pypi_name}-doc
a240f2b
%license LICENSE
b89800e
%doc doc/build/html
7e1289d
%endif
7e1289d
7e1289d
%changelog
c4cd4dc
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
c4cd4dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c4cd4dc
81179b3
* Wed Jun 03 2020 Joel Capitao <jcapitao@redhat.com> 2.1.0-1
81179b3
- Update to upstream version 2.1.0
81179b3
a9a83bd
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.33.0-4
a9a83bd
- Rebuilt for Python 3.9
a9a83bd
1352984
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.33.0-3
1352984
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1352984
503fad9
* Tue Nov 05 2019 Joel Capitao <jcapitao@redhat.com> 1.33.0-2
4a93b09
- Removed python2 subpackages in no el7 distros
4a93b09
503fad9
* Tue Nov 05 2019 RDO <dev@lists.rdoproject.org> 1.33.0-1
4a93b09
- Update to 1.33.0
4a93b09
5b5ca63
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.32.0-5
5b5ca63
- Rebuilt for Python 3.8.0rc1 (#1748018)
5b5ca63
54fa970
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.32.0-4
54fa970
- Rebuilt for Python 3.8
54fa970
a49e11c
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.32.0-3
a49e11c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
a49e11c
392380a
* Fri May 10 2019 Alfredo Moralejo <amoralej@redhat.com> 1.32.0-2
392380a
- Added stestr as BR
392380a
b89800e
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 1.32.0-1
b89800e
- Update to 1.32.0
1912658