From 35f2bcb4a0884318d65ba6b11c5d4b816c12a462 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: May 10 2019 18:46:29 +0000 Subject: Update to stein release --- diff --git a/.gitignore b/.gitignore index fce508a..1d1be5b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /python-novaclient-6.0.0.tar.gz /python-novaclient-9.1.1.tar.gz /python-novaclient-10.1.0.tar.gz +/python-novaclient-13.0.0.tar.gz diff --git a/python-novaclient.spec b/python-novaclient.spec index 7bceba4..3d073ce 100644 --- a/python-novaclient.spec +++ b/python-novaclient.spec @@ -1,6 +1,18 @@ +# Macros for py2/py3 compatibility +%if 0%{?fedora} || 0%{?rhel} > 7 +%global pyver %{python3_pkgversion} +%else +%global pyver 2 +%endif +%global pyver_bin python%{pyver} +%global pyver_sitelib %python%{pyver}_sitelib +%global pyver_install %py%{pyver}_install +%global pyver_build %py%{pyver}_build +# End of macros for py2/py3 compatibility %{!?upstream_version: %global upstream_version %{version}%{?milestone}} %global sname novaclient +%global with_doc 1 %global common_desc \ This is a client for the OpenStack Nova API. There's a Python API (the \ @@ -9,8 +21,8 @@ the OpenStack Nova API. Name: python-novaclient Epoch: 1 -Version: 10.1.0 -Release: 3%{?dist} +Version: 13.0.0 +Release: 1%{?dist} Summary: Python API and CLI for OpenStack Nova License: ASL 2.0 URL: https://launchpad.net/%{name} @@ -22,41 +34,52 @@ BuildRequires: git %description %{common_desc} -%package -n python3-%{sname} +%package -n python%{pyver}-%{sname} Summary: Python API and CLI for OpenStack Nova -%{?python_provide:%python_provide python3-novaclient} +%{?python_provide:%python_provide python%{pyver}-novaclient} +%if %{pyver} == 3 Obsoletes: python2-%{sname} < %{version}-%{release} - -BuildRequires: python3-devel -BuildRequires: python3-pbr -BuildRequires: python3-setuptools - -Requires: python3-babel >= 2.3.4 -Requires: python3-iso8601 >= 0.1.11 -Requires: python3-keystoneauth1 >= 3.3.0 -Requires: python3-oslo-i18n >= 3.15.3 -Requires: python3-oslo-serialization >= 2.18.0 -Requires: python3-oslo-utils >= 3.33.0 -Requires: python3-pbr >= 2.0.0 -Requires: python3-prettytable >= 0.7.1 -Requires: python3-simplejson >= 3.5.1 -Requires: python3-six >= 1.10.0 - -%description -n python3-%{sname} +%endif + +BuildRequires: python%{pyver}-devel +BuildRequires: python%{pyver}-pbr +BuildRequires: python%{pyver}-setuptools + +Requires: python%{pyver}-babel >= 2.3.4 +Requires: python%{pyver}-iso8601 >= 0.1.11 +Requires: python%{pyver}-keystoneauth1 >= 3.5.0 +Requires: python%{pyver}-oslo-i18n >= 3.15.3 +Requires: python%{pyver}-oslo-serialization >= 2.18.0 +Requires: python%{pyver}-oslo-utils >= 3.33.0 +Requires: python%{pyver}-pbr >= 2.0.0 +Requires: python%{pyver}-prettytable >= 0.7.2 +Requires: python%{pyver}-six >= 1.10.0 +# Handle python2 exception +%if %{pyver} == 2 +Requires: python-simplejson >= 3.5.1 +%else +Requires: python%{pyver}-simplejson >= 3.5.1 +%endif + + +%description -n python%{pyver}-%{sname} %{common_desc} +%if 0%{?with_doc} %package doc Summary: Documentation for OpenStack Nova API Client -BuildRequires: python3-sphinx -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-oslo-utils -BuildRequires: python3-keystoneauth1 -BuildRequires: python3-oslo-serialization -BuildRequires: python3-prettytable +BuildRequires: python%{pyver}-sphinx +BuildRequires: python%{pyver}-sphinxcontrib-apidoc +BuildRequires: python%{pyver}-openstackdocstheme +BuildRequires: python%{pyver}-oslo-utils +BuildRequires: python%{pyver}-keystoneauth1 +BuildRequires: python%{pyver}-oslo-serialization +BuildRequires: python%{pyver}-prettytable %description doc %{common_desc} +%endif This package contains auto-generated documentation. @@ -64,53 +87,52 @@ This package contains auto-generated documentation. %autosetup -n %{name}-%{upstream_version} -S git # Let RPM handle the requirements -rm -rf {,test-}requirements.txt +rm -rf *requirements.txt %build -%py3_build +%{pyver_build} %install -%py3_install -mv %{buildroot}%{_bindir}/nova %{buildroot}%{_bindir}/nova-%{python3_version} -ln -s ./nova-%{python3_version} %{buildroot}%{_bindir}/nova-3 -ln -s ./nova-3 %{buildroot}%{_bindir}/nova -# Delete tests -rm -fr %{buildroot}%{python3_sitelib}/novaclient/tests +%{pyver_install} +# Create a versioned binary for backwards compatibility until everything is pure py3 +ln -s nova %{buildroot}%{_bindir}/nova-%{pyver} mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d install -pm 644 tools/nova.bash_completion \ %{buildroot}%{_sysconfdir}/bash_completion.d/nova -%{__python3} setup.py build_sphinx -b html -%{__python3} setup.py build_sphinx -b man +# Delete tests +rm -fr %{buildroot}%{pyver_sitelib}/novaclient/tests + +%if 0%{?with_doc} +sphinx-build-%{pyver} -b html doc/source doc/build/html +sphinx-build-%{pyver} -b man doc/source doc/build/man install -p -D -m 644 doc/build/man/nova.1 %{buildroot}%{_mandir}/man1/nova.1 # Fix hidden-file-or-dir warnings -rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo +rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo doc/build/html/.htaccess +%endif -%files -n python3-%{sname} +%files -n python%{pyver}-%{sname} %license LICENSE %doc README.rst -%{python3_sitelib}/%{sname} -%{python3_sitelib}/*.egg-info +%{pyver_sitelib}/%{sname} +%{pyver_sitelib}/*.egg-info %{_sysconfdir}/bash_completion.d +%if 0%{?with_doc} %{_mandir}/man1/nova.1.gz +%endif %{_bindir}/nova -%{_bindir}/nova-3 -%{_bindir}/nova-%{python3_version} +%{_bindir}/nova-%{pyver} +%if 0%{?with_doc} %files doc %doc doc/build/html %license LICENSE +%endif %changelog -* Fri Feb 15 2019 Alfredo Moralejo - 1:10.1.0-3 -- Remove python2 subpackages - -* Sat Feb 02 2019 Fedora Release Engineering - 1:10.1.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Tue Jun 05 2018 RDO 1:10.1.0-1 -- Update to 10.1.0 +* Mon Mar 11 2019 RDO 1:13.0.0-1 +- Update to 13.0.0 diff --git a/sources b/sources index 2ce9c90..c26765f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-novaclient-10.1.0.tar.gz) = 45c4876a67e2f69687c241c1d54ce3ee170a537cb9c84e6ef8f089c01acac31ae2b691d24bf5c820033eb35a91d3398a62ef552f6482059b7ac8c25979608578 +SHA512 (python-novaclient-13.0.0.tar.gz) = 91994e5f0ea5537d27cb0fbfe1c1412c9e3e423d8c0d0028a1011645722d2b1b30718fa7a502ffe154a3299e603ba9bb4aa51f1187b67c1cebce564203030981