6ccdbd0
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
6ccdbd0
%global sources_gpg_sign 0x2426b928085a020d8a90d0d879ab7008d0896c8a
b0cbfd8
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
b0cbfd8
510267d
%global sname glanceclient
bfa1169
%global with_doc 1
510267d
58e79d0
%global common_desc \
58e79d0
This is a client for the OpenStack Glance API. There's a Python API (the \
58e79d0
glanceclient module), and a command-line script (glance). Each implements \
58e79d0
100% of the OpenStack Glance API.
58e79d0
2e5cd57
Name:             python-glanceclient
Alan Pevec b450cf1
Epoch:            1
6ccdbd0
Version:          3.2.2
5cf41d1
Release:          2%{?dist}
2e5cd57
Summary:          Python API and CLI for OpenStack Glance
2e5cd57
2e5cd57
License:          ASL 2.0
510267d
URL:              https://launchpad.net/python-glanceclient
5f32083
Source0:          https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz
6ccdbd0
# Required for tarball sources verification
6ccdbd0
%if 0%{?sources_gpg} == 1
6ccdbd0
Source101:        https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz.asc
6ccdbd0
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
6ccdbd0
%endif
2e5cd57
2e5cd57
BuildArch:        noarch
510267d
6ccdbd0
# Required for tarball sources verification
6ccdbd0
%if 0%{?sources_gpg} == 1
6ccdbd0
BuildRequires:  /usr/bin/gpgv2
6ccdbd0
%endif
6ccdbd0
36a9575
BuildRequires:    git
36a9575
510267d
%description
58e79d0
%{common_desc}
510267d
3bb403a
%package -n python3-%{sname}
510267d
Summary:          Python API and CLI for OpenStack Glance
3bb403a
%{?python_provide:%python_provide python3-glanceclient}
bfa1169
Obsoletes: python2-%{sname} < %{version}-%{release}
bfa1169
3bb403a
BuildRequires:    python3-devel
3bb403a
BuildRequires:    python3-setuptools
3bb403a
BuildRequires:    python3-pbr
bfa1169
3bb403a
Requires:         python3-keystoneauth1 >= 3.6.2
3bb403a
Requires:         python3-oslo-i18n >= 3.15.3
3bb403a
Requires:         python3-oslo-utils >= 3.33.0
3bb403a
Requires:         python3-pbr
3bb403a
Requires:         python3-prettytable
3bb403a
Requires:         python3-pyOpenSSL >= 17.1.0
3bb403a
Requires:         python3-requests
3bb403a
Requires:         python3-warlock
3bb403a
Requires:         python3-wrapt
bfa1169
3bb403a
3bb403a
%description -n python3-%{sname}
58e79d0
%{common_desc}
Jakub Ruzicka 155028f
bfa1169
%if 0%{?with_doc}
Jakub Ruzicka 155028f
%package doc
510267d
Summary:          Documentation for OpenStack Glance API Client
Jakub Ruzicka 155028f
3bb403a
BuildRequires:    python3-sphinx
3bb403a
BuildRequires:    python3-openstackdocstheme
3bb403a
BuildRequires:    python3-keystoneauth1
3bb403a
BuildRequires:    python3-oslo-utils
3bb403a
BuildRequires:    python3-prettytable
3bb403a
BuildRequires:    python3-pyOpenSSL >= 17.1.0
3bb403a
BuildRequires:    python3-sphinxcontrib-apidoc
3bb403a
BuildRequires:    python3-warlock
Jakub Ruzicka 155028f
Jakub Ruzicka 155028f
%description      doc
58e79d0
%{common_desc}
Jakub Ruzicka 155028f
Jakub Ruzicka 155028f
This package contains auto-generated documentation.
bfa1169
%endif
Jakub Ruzicka 155028f
2e5cd57
%prep
6ccdbd0
# Required for tarball sources verification
6ccdbd0
%if 0%{?sources_gpg} == 1
6ccdbd0
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
6ccdbd0
%endif
36a9575
%autosetup -n %{name}-%{upstream_version} -S git
Alan Pevec cc5fbf2
bfa1169
rm -rf *requirements.txt
2e5cd57
2e5cd57
%build
3bb403a
%{py3_build}
2e5cd57
2e5cd57
%install
3bb403a
%{py3_install}
bfa1169
bfa1169
# Create a versioned binary for backwards compatibility until everything is pure py3
3bb403a
ln -s glance %{buildroot}%{_bindir}/glance-3
510267d
510267d
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
510267d
install -pm 644 tools/glance.bash_completion \
510267d
    %{buildroot}%{_sysconfdir}/bash_completion.d/glance
510267d
bfa1169
# Delete tests
3bb403a
rm -fr %{buildroot}%{python3_sitelib}/glanceclient/tests
bfa1169
bfa1169
%if 0%{?with_doc}
36a9575
# generate html docs
3bb403a
sphinx-build -b html doc/source doc/build/html
3bb403a
# remove the sphinx-build leftovers
bfa1169
rm -rf doc/build/html/.{doctrees,buildinfo}
Jakub Ruzicka 5872968
# generate man page
3bb403a
sphinx-build -b man doc/source doc/build/man
36a9575
install -p -D -m 644 doc/build/man/glance.1 %{buildroot}%{_mandir}/man1/glance.1
bfa1169
%endif
Alan Pevec 22f3083
3bb403a
%files -n python3-%{sname}
510267d
%doc README.rst
bfa1169
%license LICENSE
3bb403a
%{python3_sitelib}/glanceclient
3bb403a
%{python3_sitelib}/*.egg-info
510267d
%{_sysconfdir}/bash_completion.d
bfa1169
%if 0%{?with_doc}
510267d
%{_mandir}/man1/glance.1.gz
bfa1169
%endif
f81392a
%{_bindir}/glance
3bb403a
%{_bindir}/glance-3
Jakub Ruzicka 155028f
bfa1169
%if 0%{?with_doc}
Jakub Ruzicka 155028f
%files doc
36a9575
%doc doc/build/html
510267d
%license LICENSE
bfa1169
%endif
2e5cd57
2e5cd57
%changelog
6ccdbd0
* Wed Oct 28 2020 Alfredo Moralejo <amoralej@redhat.com> 1:3.2.2-2
6ccdbd0
- Update to upstream version 3.2.2
6ccdbd0
5cf41d1
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1.1-2
5cf41d1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5cf41d1
3bb403a
* Wed Jun 03 2020 Joel Capitao <jcapitao@redhat.com> 1:3.1.1-1
3bb403a
- Update to upstream version 3.1.1
3bb403a
04010cf
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1:2.17.0-3
04010cf
- Rebuilt for Python 3.9
04010cf
9539ea6
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.17.0-2
9539ea6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
9539ea6
f6c7c70
* Tue Nov 05 2019 Alfredo Moralejo <amoralej@redhat.com> 1:2.17.0-1
f6c7c70
- Update to upstream version 2.17.0
f6c7c70
4beea72
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.16.0-4
4beea72
- Rebuilt for Python 3.8.0rc1 (#1748018)
4beea72
e66357f
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1:2.16.0-3
e66357f
- Rebuilt for Python 3.8
e66357f
6182976
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.16.0-2
6182976
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
6182976
bfa1169
* Mon Mar 11 2019 RDO <dev@lists.rdoproject.org> 1:2.16.0-1
bfa1169
- Update to 2.16.0
448b547