7471d5c
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
7471d5c
0a09127
%global sname novaclient
35f2bcb
%global with_doc 1
0a09127
027794d
%global common_desc \
027794d
This is a client for the OpenStack Nova API. There's a Python API (the \
027794d
novaclient module), and a command-line script (nova). Each implements 100% of \
027794d
the OpenStack Nova API.
027794d
Mark McLoughlin acbee3d
Name:             python-novaclient
039c8c7
Epoch:            1
4e57feb
Version:          17.2.1
4e57feb
Release:          1%{?dist}
Mark McLoughlin acbee3d
Summary:          Python API and CLI for OpenStack Nova
Mark McLoughlin acbee3d
License:          ASL 2.0
027794d
URL:              https://launchpad.net/%{name}
0a09127
Source0:          https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz
Mark McLoughlin acbee3d
BuildArch:        noarch
0a09127
027794d
BuildRequires:  git
027794d
0a09127
%description
027794d
%{common_desc}
0a09127
d3632d4
%package -n python3-%{sname}
0a09127
Summary:          Python API and CLI for OpenStack Nova
d3632d4
%{?python_provide:%python_provide python3-novaclient}
7006047
Obsoletes: python2-%{sname} < %{version}-%{release}
35f2bcb
d3632d4
BuildRequires:    python3-devel
d3632d4
BuildRequires:    python3-pbr
d3632d4
BuildRequires:    python3-setuptools
35f2bcb
d3632d4
Requires:         python3-iso8601 >= 0.1.11
d3632d4
Requires:         python3-keystoneauth1 >= 3.5.0
d3632d4
Requires:         python3-oslo-i18n >= 3.15.3
d3632d4
Requires:         python3-oslo-serialization >= 2.18.0
d3632d4
Requires:         python3-oslo-utils >= 3.33.0
d3632d4
Requires:         python3-pbr >= 2.0.0
d3632d4
Requires:         python3-prettytable >= 0.7.2
4e57feb
Requires:         python3-stevedore >= 2.0.1
d3632d4
d3632d4
%description -n python3-%{sname}
027794d
%{common_desc}
0a09127
35f2bcb
%if 0%{?with_doc}
Mark McLoughlin acbee3d
%package doc
Mark McLoughlin acbee3d
Summary:          Documentation for OpenStack Nova API Client
Mark McLoughlin acbee3d
d3632d4
BuildRequires:    python3-sphinx
d3632d4
BuildRequires:    python3-sphinxcontrib-apidoc
d3632d4
BuildRequires:    python3-openstackdocstheme
d3632d4
BuildRequires:    python3-oslo-utils
d3632d4
BuildRequires:    python3-keystoneauth1
d3632d4
BuildRequires:    python3-oslo-serialization
d3632d4
BuildRequires:    python3-prettytable
Mark McLoughlin acbee3d
Mark McLoughlin acbee3d
%description      doc
027794d
%{common_desc}
Mark McLoughlin acbee3d
Mark McLoughlin acbee3d
This package contains auto-generated documentation.
b9a1c69
%endif
Mark McLoughlin acbee3d
Mark McLoughlin acbee3d
%prep
bdbb334
%autosetup -n %{name}-%{upstream_version} -S git
Mark McLoughlin acbee3d
Jakub Ruzicka fe58fbe
# Let RPM handle the requirements
35f2bcb
rm -rf *requirements.txt
Mark McLoughlin acbee3d
Mark McLoughlin acbee3d
%build
d3632d4
%{py3_build}
Mark McLoughlin acbee3d
Mark McLoughlin acbee3d
%install
d3632d4
%{py3_install}
35f2bcb
# Create a versioned binary for backwards compatibility until everything is pure py3
d3632d4
ln -s nova %{buildroot}%{_bindir}/nova-3
Mark McLoughlin acbee3d
Alan Pevec 697e4ca
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
Jakub Ruzicka 25df862
install -pm 644 tools/nova.bash_completion \
Jakub Ruzicka 25df862
    %{buildroot}%{_sysconfdir}/bash_completion.d/nova
Alan Pevec 697e4ca
35f2bcb
# Delete tests
d3632d4
rm -fr %{buildroot}%{python3_sitelib}/novaclient/tests
35f2bcb
35f2bcb
%if 0%{?with_doc}
d3632d4
sphinx-build -b html doc/source doc/build/html
d3632d4
sphinx-build -b man doc/source doc/build/man
Jakub Ruzicka 25df862
bdbb334
install -p -D -m 644 doc/build/man/nova.1 %{buildroot}%{_mandir}/man1/nova.1
Mark McLoughlin acbee3d
Mark McLoughlin acbee3d
# Fix hidden-file-or-dir warnings
35f2bcb
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo doc/build/html/.htaccess
35f2bcb
%endif
Mark McLoughlin acbee3d
d3632d4
%files -n python3-%{sname}
0a09127
%license LICENSE
0a09127
%doc README.rst
d3632d4
%{python3_sitelib}/%{sname}
d3632d4
%{python3_sitelib}/*.egg-info
0a09127
%{_sysconfdir}/bash_completion.d
35f2bcb
%if 0%{?with_doc}
0a09127
%{_mandir}/man1/nova.1.gz
35f2bcb
%endif
7006047
%{_bindir}/nova
d3632d4
%{_bindir}/nova-3
Mark McLoughlin acbee3d
35f2bcb
%if 0%{?with_doc}
Mark McLoughlin acbee3d
%files doc
bdbb334
%doc doc/build/html
0a09127
%license LICENSE
35f2bcb
%endif
Mark McLoughlin acbee3d
Mark McLoughlin acbee3d
%changelog
4e57feb
* Wed Oct 28 2020 Alfredo Moralejo <amoralej@redhat.com> 1:17.2.1-1
4e57feb
- Update to upstream version 17.2.1
4e57feb
5950f01
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:17.0.0-2
5950f01
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5950f01
d3632d4
* Wed Jun 03 2020 Joel Capitao <jcapitao@redhat.com> 1:17.0.0-1
d3632d4
- Update to upstream version 17.0.0
d3632d4
14bb916
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1:15.1.0-3
14bb916
- Rebuilt for Python 3.9
14bb916
9d0dde6
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:15.1.0-2
9d0dde6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
9d0dde6
b9a1c69
* Tue Nov 05 2019 Alfredo Moralejo <amoralej@redhat.com> 1:15.1.0-1
b9a1c69
- Update to upstream version 15.1.0
b9a1c69
a5958f9
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1:13.0.0-4
a5958f9
- Rebuilt for Python 3.8.0rc1 (#1748018)
a5958f9
2a55b11
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1:13.0.0-3
2a55b11
- Rebuilt for Python 3.8
2a55b11
07a85dd
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:13.0.0-2
07a85dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
07a85dd
35f2bcb
* Mon Mar 11 2019 RDO <dev@lists.rdoproject.org> 1:13.0.0-1
35f2bcb
- Update to 13.0.0
Mark McLoughlin acbee3d