b0cbfd8
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
b0cbfd8
510267d
%global sname glanceclient
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
b450cf1
Epoch:            1
58e79d0
Version:          2.10.0
f81392a
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
2e5cd57
2e5cd57
BuildArch:        noarch
510267d
36a9575
BuildRequires:    git
36a9575
510267d
%description
58e79d0
%{common_desc}
510267d
510267d
%package -n python3-%{sname}
510267d
Summary:          Python API and CLI for OpenStack Glance
510267d
%{?python_provide:%python_provide python3-glanceclient}
510267d
510267d
BuildRequires:    python3-devel
510267d
BuildRequires:    python3-setuptools
510267d
BuildRequires:    python3-pbr
510267d
58e79d0
Requires:         python3-keystoneauth1 >= 3.3.0
58e79d0
Requires:         python3-oslo-i18n >= 3.15.3
58e79d0
Requires:         python3-oslo-utils >= 3.33.0
510267d
Requires:         python3-pbr
510267d
Requires:         python3-prettytable
58e79d0
Requires:         python3-pyOpenSSL >= 16.2.0
510267d
Requires:         python3-requests
58e79d0
Requires:         python3-six >= 1.10.0
510267d
Requires:         python3-warlock
36a9575
Requires:         python3-wrapt
510267d
510267d
%description -n python3-%{sname}
58e79d0
%{common_desc}
Jakub Ruzicka 155028f
Jakub Ruzicka 155028f
%package doc
510267d
Summary:          Documentation for OpenStack Glance API Client
Jakub Ruzicka 155028f
f81392a
BuildRequires:    python3-sphinx
f81392a
BuildRequires:    python3-openstackdocstheme
f81392a
BuildRequires:    python3-keystoneauth1
f81392a
BuildRequires:    python3-oslo-utils
f81392a
BuildRequires:    python3-prettytable
f81392a
BuildRequires:    python3-pyOpenSSL >= 16.2.0
f81392a
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.
Jakub Ruzicka 155028f
2e5cd57
%prep
36a9575
%autosetup -n %{name}-%{upstream_version} -S git
cc5fbf2
Jakub Ruzicka 155028f
rm -rf {,test-}requirements.txt
2e5cd57
2e5cd57
%build
510267d
%py3_build
2e5cd57
2e5cd57
%install
510267d
%py3_install
510267d
# Delete tests
510267d
rm -fr %{buildroot}%{python3_sitelib}/glanceclient/tests
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
36a9575
# generate html docs
f81392a
%{__python3} setup.py build_sphinx -b html
Jakub Ruzicka 5872968
# generate man page
f81392a
%{__python3} setup.py build_sphinx -b man
36a9575
install -p -D -m 644 doc/build/man/glance.1 %{buildroot}%{_mandir}/man1/glance.1
22f3083
510267d
%files -n python3-%{sname}
510267d
%license LICENSE
510267d
%doc README.rst
510267d
%{python3_sitelib}/%{sname}
510267d
%{python3_sitelib}/*.egg-info
510267d
%{_sysconfdir}/bash_completion.d
510267d
%{_mandir}/man1/glance.1.gz
f81392a
%{_bindir}/glance
Jakub Ruzicka 155028f
Jakub Ruzicka 155028f
%files doc
36a9575
%doc doc/build/html
510267d
%license LICENSE
2e5cd57
2e5cd57
%changelog
f81392a
* Wed Jan 31 2019 Yatin Karel <ykarel@redhat.com> 1:2.10.0-2
f81392a
- Drop python2 sub package
f81392a
58e79d0
* Wed Apr 18 2018 RDO <dev@lists.rdoproject.org> 1:2.10.0-1
58e79d0
- Update to 2.10.0
161aaf6
58e79d0
* Sat Feb 10 2018 RDO <dev@lists.rdoproject.org> 1:2.9.1-1
58e79d0
- Update to 2.9.1
448b547