a269a56
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
879acb4
%global sources_gpg_sign 0x2ef3fe0ec2b075ab7458b5f8b702b20b13df2318
7471d5c
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
69ac4e0
# we are excluding some BRs from automatic generator
69ac4e0
%global excluded_brs doc8 bandit pre-commit hacking flake8-import-order whereto tempest osprofiler
69ac4e0
# Exclude sphinx from BRs if docs are disabled
69ac4e0
%if ! 0%{?with_doc}
69ac4e0
%global excluded_brs %{excluded_brs} sphinx openstackdocstheme
69ac4e0
%endif
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
879acb4
Version:          18.6.0
879acb4
Release:          1%{?dist}
Mark McLoughlin acbee3d
Summary:          Python API and CLI for OpenStack Nova
69ac4e0
License:          Apache-2.0
027794d
URL:              https://launchpad.net/%{name}
0a09127
Source0:          https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz
a269a56
# Required for tarball sources verification
a269a56
%if 0%{?sources_gpg} == 1
a269a56
Source101:        https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz.asc
a269a56
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
a269a56
%endif
a269a56
Mark McLoughlin acbee3d
BuildArch:        noarch
0a09127
a269a56
# Required for tarball sources verification
a269a56
%if 0%{?sources_gpg} == 1
a269a56
BuildRequires:  /usr/bin/gpgv2
a269a56
%endif
a269a56
476a423
BuildRequires:  git-core
027794d
0a09127
%description
027794d
%{common_desc}
0a09127
d3632d4
%package -n python3-%{sname}
0a09127
Summary:          Python API and CLI for OpenStack Nova
35f2bcb
d3632d4
BuildRequires:    python3-devel
69ac4e0
BuildRequires:    pyproject-rpm-macros
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
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
a269a56
# Required for tarball sources verification
a269a56
%if 0%{?sources_gpg} == 1
a269a56
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
a269a56
%endif
bdbb334
%autosetup -n %{name}-%{upstream_version} -S git
Mark McLoughlin acbee3d
69ac4e0
sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini
69ac4e0
sed -i "s/^deps = -c{env:.*_CONSTRAINTS_FILE.*/deps =/" tox.ini
69ac4e0
sed -i /^minversion.*/d tox.ini
69ac4e0
sed -i /^requires.*virtualenv.*/d tox.ini
69ac4e0
sed -i /^.*whereto/d tox.ini
69ac4e0
69ac4e0
# Exclude some bad-known BRs
69ac4e0
for pkg in %{excluded_brs}; do
69ac4e0
  for reqfile in doc/requirements.txt test-requirements.txt; do
69ac4e0
    if [ -f $reqfile ]; then
69ac4e0
      sed -i /^${pkg}.*/d $reqfile
69ac4e0
    fi
69ac4e0
  done
69ac4e0
done
69ac4e0
69ac4e0
# Automatic BR generation
69ac4e0
%generate_buildrequires
69ac4e0
%if 0%{?with_doc}
69ac4e0
  %pyproject_buildrequires -t -e %{default_toxenv},docs
69ac4e0
%else
69ac4e0
  %pyproject_buildrequires -t -e %{default_toxenv}
69ac4e0
%endif
Mark McLoughlin acbee3d
Mark McLoughlin acbee3d
%build
69ac4e0
%pyproject_wheel
Mark McLoughlin acbee3d
Mark McLoughlin acbee3d
%install
69ac4e0
%pyproject_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
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
697e4ca
35f2bcb
# Delete tests
d3632d4
rm -fr %{buildroot}%{python3_sitelib}/novaclient/tests
35f2bcb
35f2bcb
%if 0%{?with_doc}
69ac4e0
%tox -e docs
d3632d4
sphinx-build -b man doc/source doc/build/man
bdbb334
install -p -D -m 644 doc/build/man/nova.1 %{buildroot}%{_mandir}/man1/nova.1
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}
69ac4e0
%{python3_sitelib}/*.dist-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
879acb4
* Mon May 06 2024 Alfredo Moralejo <amoralej@redhat.com> 1:18.6.0-1
879acb4
- Update to upstream version 18.6.0
879acb4
5b5fdeb
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:18.4.0-3
5b5fdeb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
5b5fdeb
40e5aa6
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:18.4.0-2
40e5aa6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
40e5aa6
69ac4e0
* Wed Oct 25 2023 Alfredo Moralejo <amoralej@gmail.com> 1:18.4.0-1
69ac4e0
- Update to upstream version 18.4.0
69ac4e0
22a6802
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:18.3.0-3
22a6802
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
22a6802
c74578e
* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 1:18.3.0-2
c74578e
- Rebuilt for Python 3.12
c74578e
3ec4baa
* Fri Apr 21 2023 Karolina Kula <kkula@redhat.com> 1:18.3.0-1
3ec4baa
- Update to upstream version 18.3.0
3ec4baa
e886e06
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:18.1.0-2
e886e06
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
e886e06
3041699
* Fri Nov 18 2022 Alfredo Moralejo <amoralej@redhat.com> 1:18.1.0-1
3041699
- Update to upstream version 18.1.0
3041699
1a3123a
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:17.7.0-3
1a3123a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
1a3123a
fb1dd43
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 1:17.7.0-2
fb1dd43
- Rebuilt for Python 3.11
fb1dd43
f944738
* Wed May 18 2022 Joel Capitao <jcapitao@redhat.com> 1:17.7.0-1
f944738
- Update to upstream version 17.7.0
f944738
0e76da4
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:17.4.0-4
0e76da4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
0e76da4
5aafec5
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:17.4.0-3
5aafec5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
5aafec5
a786cf9
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1:17.4.0-2
a786cf9
- Rebuilt for Python 3.10
a786cf9
476a423
* Tue Mar 16 2021 Joel Capitao <jcapitao@redhat.com> 1:17.4.0-1
476a423
- Update to upstream version 17.4.0
476a423
752981d
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:17.2.1-2
752981d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
752981d
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