diff --git a/python-cinderclient-4.0.3.tar.gz b/python-cinderclient-4.0.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..06dd0a95d2139934d769cb80942b478acdc89d6f Binary files /dev/null and b/python-cinderclient-4.0.3.tar.gz differ diff --git a/python-cinderclient-7.2.0.tar.gz b/python-cinderclient-7.2.0.tar.gz deleted file mode 100755 index 7f110b3086cafde8ccfb61e1c9036ada7580a28e..0000000000000000000000000000000000000000 Binary files a/python-cinderclient-7.2.0.tar.gz and /dev/null differ diff --git a/python-cinderclient.spec b/python-cinderclient.spec old mode 100755 new mode 100644 index 9952b93cb8e3b175280a416766003a4a8eea1ddf..328ec0827ac928eb9e02b0ce7b6d75dcf9577a84 --- a/python-cinderclient.spec +++ b/python-cinderclient.spec @@ -1,110 +1,154 @@ -%global _empty_manifest_terminate_build 0 -%global with_doc 1 +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname cinderclient +%global with_python3 0 + +%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: 7.2.0 -Release: 2%{?dist} +Version: 4.0.3 +Release: 1 Summary: Python API and CLI for OpenStack Cinder + License: Apache-2.0 URL: http://github.com/openstack/python-cinderclient -Source0: https://tarballs.openstack.org/python-cinderclient/python-cinderclient-7.2.0.tar.gz +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + BuildArch: noarch +BuildRequires: git + %description -Client library (cinderclient python module) and command line utility \ -(cinder) for interacting with OpenStack Cinder (Block Storage) API. +%{common_desc} + +%package -n python2-%{sname} +Summary: Python API and CLI for OpenStack Cinder +%{?python_provide:%python_provide python2-%{sname}} -%package -n python3-cinderclient +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr + +Requires: python2-babel +Requires: python2-pbr +Requires: python2-prettytable +Requires: python2-requests +Requires: python2-six +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-simplejson + +%description -n python2-%{sname} +%{common_desc} + + +%if 0%{?with_python3} +%package -n python3-%{sname} Summary: Python API and CLI for OpenStack Cinder -%{?python_provide:%python_provide python3-cinderclient} +%{?python_provide:%python_provide python3-%{sname}} -BuildRequires: git -BuildRequires: openstack-macros BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pbr -BuildRequires: python3-pip +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.4.0 Requires: python3-oslo-i18n >= 3.15.3 Requires: python3-oslo-utils >= 3.33.0 -Requires: python3-simplejson -Requires: python3-stevedore >= 1.20.0 -%description -n python3-cinderclient -Client library (cinderclient python module) and command line utility \ -(cinder) for interacting with OpenStack Cinder (Block Storage) API. +%description -n python3-%{sname} +%{common_desc} +%endif + -%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: python3-keystoneauth1 -BuildRequires: python3-oslo-utils -BuildRequires: python3-prettytable +BuildRequires: python2-reno +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme %description doc -Client library (cinderclient python module) and command line utility \ -(cinder) for interacting with OpenStack Cinder (Block Storage) API. +%{common_desc} + This package contains auto-generated documentation. -%endif + %prep -%autosetup -n python-cinderclient-7.2.0 -S git +%autosetup -n %{name}-%{upstream_version} -S git + +# Remove bundled egg-info rm -rf python_cinderclient.egg-info + # Let RPM handle the requirements rm -f {,test-}requirements.txt %build -%{py3_build} +%py2_build +%if 0%{?with_python3} +%py3_build +%endif -%if 0%{?with_doc} -export PYTHONPATH=. -sphinx-build-3 -W -b html doc/source doc/build/html -sphinx-build-3 -W -b man doc/source doc/build/man +sphinx-build -W -b html doc/source doc/build/html +sphinx-build -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} -# Create a versioned binary for backwards compatibility until everything is pure py3 -ln -s cinder %{buildroot}%{_bindir}/cinder-3 - +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/cinder %{buildroot}%{_bindir}/cinder-%{python3_version} +ln -s ./cinder-%{python3_version} %{buildroot}%{_bindir}/cinder-3 # Delete tests rm -fr %{buildroot}%{python3_sitelib}/cinderclient/tests +%endif + +%py2_install +mv %{buildroot}%{_bindir}/cinder %{buildroot}%{_bindir}/cinder-%{python2_version} +ln -s ./cinder-%{python2_version} %{buildroot}%{_bindir}/cinder-2 +# Delete tests +rm -fr %{buildroot}%{python2_sitelib}/cinderclient/tests + +ln -s ./cinder-2 %{buildroot}%{_bindir}/cinder 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-cinderclient +%files -n python2-%{sname} %doc README.rst %license LICENSE %{_bindir}/cinder -%{_bindir}/cinder-3 -%{python3_sitelib}/cinderclient -%{python3_sitelib}/*.egg-info +%{_bindir}/cinder-2* +%{python2_sitelib}/cinderclient +%{python2_sitelib}/*.egg-info %{_sysconfdir}/bash_completion.d/cinder.bash_completion -%if 0%{?with_doc} %{_mandir}/man1/cinder.1* + +%if 0%{?with_python3} +%files -n python3-%{sname} +%doc README.rst +%license LICENSE +%{_bindir}/cinder-3* +%{python3_sitelib}/cinderclient +%{python3_sitelib}/*.egg-info %endif -%if 0%{?with_doc} %files doc %doc doc/build/html -%endif %changelog -* Thu Jan 07 2021 Python_Bot +* Fri May 07 2021 Python_Bot - Package Spec generated