From 4f737b807bc5c114a45713e7e5a4c8d2cdeab541 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: May 10 2019 19:11:40 +0000 Subject: Update to stein release --- diff --git a/.gitignore b/.gitignore index 7d95b98..ac91f15 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ /python-cinderclient-1.11.0.tar.gz /python-cinderclient-3.1.0.tar.gz /python-cinderclient-3.5.0.tar.gz +/python-cinderclient-4.1.0.tar.gz diff --git a/python-cinderclient.spec b/python-cinderclient.spec index 86d637c..8a4d01d 100644 --- a/python-cinderclient.spec +++ b/python-cinderclient.spec @@ -1,14 +1,27 @@ +# 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 cinderclient +%global with_doc 1 + %global common_desc \ Client library (cinderclient python module) and command line utility \ (cinder) for interacting with OpenStack Cinder (Block Storage) API. Name: python-cinderclient -Version: 3.5.0 -Release: 3%{?dist} +Version: 4.1.0 +Release: 1%{?dist} Summary: Python API and CLI for OpenStack Cinder License: ASL 2.0 @@ -22,42 +35,46 @@ BuildRequires: git %description %{common_desc} -%package -n python3-%{sname} +%package -n python%{pyver}-%{sname} Summary: Python API and CLI for OpenStack Cinder -%{?python_provide:%python_provide python3-%{sname}} - -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr -BuildRequires: python3-d2to1 - -Requires: python3-babel -Requires: python3-pbr -Requires: python3-prettytable -Requires: python3-requests -Requires: python3-setuptools -Requires: python3-simplejson -Requires: python3-six -Requires: python3-keystoneauth1 >= 3.3.0 -Requires: python3-oslo-i18n >= 3.15.3 -Requires: python3-oslo-utils >= 3.33.0 - -%description -n python3-%{sname} +%{?python_provide:%python_provide python%{pyver}-%{sname}} + +BuildRequires: python%{pyver}-devel +BuildRequires: python%{pyver}-setuptools +BuildRequires: python%{pyver}-pbr +# Handle python2 exception +%if %{pyver} == 2 +BuildRequires: python-d2to1 +%else +BuildRequires: python%{pyver}-d2to1 +%endif +Requires: python%{pyver}-babel +Requires: python%{pyver}-pbr +Requires: python%{pyver}-prettytable +Requires: python%{pyver}-requests +Requires: python%{pyver}-six +Requires: python%{pyver}-keystoneauth1 >= 3.4.0 +Requires: python%{pyver}-oslo-i18n >= 3.15.3 +Requires: python%{pyver}-oslo-utils >= 3.33.0 +Requires: python%{pyver}-simplejson + +%description -n python%{pyver}-%{sname} %{common_desc} - +%if 0%{?with_doc} %package doc Summary: Documentation for OpenStack Cinder API Client +Group: Documentation -BuildRequires: python3-reno -BuildRequires: python3-sphinx -BuildRequires: python3-openstackdocstheme +BuildRequires: python%{pyver}-reno +BuildRequires: python%{pyver}-sphinx +BuildRequires: python%{pyver}-openstackdocstheme %description doc %{common_desc} This package contains auto-generated documentation. - +%endif %prep %autosetup -n %{name}-%{upstream_version} -S git @@ -69,49 +86,48 @@ rm -rf python_cinderclient.egg-info rm -f {,test-}requirements.txt %build -%py3_build - -# FIXME (amoralej): following manual edit on conf.py is required for man page -# until https://review.openstack.org/#/c/489123 is merged -sed -i 's/man\/cinder/user\/cinder/' doc/source/conf.py +%{pyver_build} -%{__python3} setup.py build_sphinx -b html -%{__python3} setup.py build_sphinx -b man +%if 0%{?with_doc} +sphinx-build-%{pyver} -W -b html doc/source doc/build/html +sphinx-build-%{pyver} -W -b man doc/source doc/build/man # Fix hidden-file-or-dir warnings rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo +%endif %install -%py3_install +%{pyver_install} +# Create a versioned binary for backwards compatibility until everything is pure py3 +ln -s cinder %{buildroot}%{_bindir}/cinder-%{pyver} # Delete tests -rm -fr %{buildroot}%{python3_sitelib}/cinderclient/tests +rm -fr %{buildroot}%{pyver_sitelib}/cinderclient/tests install -p -D -m 644 tools/cinder.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/cinder.bash_completion +%if 0%{?with_doc} install -p -D -m 644 doc/build/man/cinder.1 %{buildroot}%{_mandir}/man1/cinder.1 +%endif -%files -n python3-%{sname} +%files -n python%{pyver}-%{sname} %doc README.rst %license LICENSE %{_bindir}/cinder -%{python3_sitelib}/cinderclient -%{python3_sitelib}/*.egg-info +%{_bindir}/cinder-%{pyver} +%{pyver_sitelib}/cinderclient +%{pyver_sitelib}/*.egg-info %{_sysconfdir}/bash_completion.d/cinder.bash_completion +%if 0%{?with_doc} %{_mandir}/man1/cinder.1* +%endif - +%if 0%{?with_doc} %files doc %doc doc/build/html +%endif %changelog -* Sat Feb 02 2019 Fedora Release Engineering - 3.5.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Nov 19 2018 Miro HronĨok - 3.5.0-2 -- Subpackage python2-cinderclient has been removed - See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Sun Feb 11 2018 RDO 3.5.0-1 -- Update to 3.5.0 +* Mon Mar 11 2019 RDO 4.1.0-1 +- Update to 4.1.0 diff --git a/sources b/sources index 0222380..41f0a43 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-cinderclient-3.5.0.tar.gz) = 0ee11c19b404c5f335422a5a18d01529330dc8d39b58c5f8b6be28a0e682858f1fea5f21bfcfc2a272a556f1a3a61fa6a0379fadbe79b65a4ad72cccf42a6223 +SHA512 (python-cinderclient-4.1.0.tar.gz) = e895e90dd12802c5991bd05c825b712b30bded38a5dd0dc8d845949cc7e76440959a426cb680447496cccdbb0d5aa31f3b982838a91c7b36e8e31bbaa3fb7b7a