diff --git a/python-novaclient-11.0.1.tar.gz b/python-novaclient-11.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4525c3fd9706d1ddc0cd25c08f31e0a877bf3654 Binary files /dev/null and b/python-novaclient-11.0.1.tar.gz differ diff --git a/python-novaclient-17.2.1.tar.gz b/python-novaclient-17.2.1.tar.gz deleted file mode 100644 index 21e758ee308a774cbad09aa554f47351ef626094..0000000000000000000000000000000000000000 Binary files a/python-novaclient-17.2.1.tar.gz and /dev/null differ diff --git a/python-novaclient.spec b/python-novaclient.spec index 8a0879a457a309f0ce9396337e729e8d1709d9b5..6d16778590ae81ba25672ff3b8a3f228e865a712 100644 --- a/python-novaclient.spec +++ b/python-novaclient.spec @@ -1,104 +1,163 @@ -%global _empty_manifest_terminate_build 0 -%global with_doc 1 +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname novaclient + +%global with_python3 0 + +%global common_desc \ +This is a client for the OpenStack Nova API. There's a Python API (the \ +novaclient module), and a command-line script (nova). Each implements 100% of \ +the OpenStack Nova API. Name: python-novaclient -Epoch: 1 -Version: 17.2.1 -Release: 1%{?dist} +Epoch: 2 +Version: 11.0.1 +Release: 1 Summary: Python API and CLI for OpenStack Nova License: Apache-2.0 -URL: https://launchpad.net/python-novaclient -Source0: https://pypi.io/packages/source/p/python-novaclient/python-novaclient-17.2.1.tar.gz +URL: https://launchpad.net/%{name} +Source0: https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch +BuildRequires: git +BuildRequires: openstack-macros %description -This is a client for the OpenStack Nova API. There's a Python API (the \ -novaclient module), and a command-line script (nova). Each implements 100% of \ -the OpenStack Nova API. +%{common_desc} -%package -n python3-novaclient +%package -n python2-%{sname} +Summary: Python API and CLI for OpenStack Nova +%{?python_provide:%python_provide python2-novaclient} + +BuildRequires: python2-devel +BuildRequires: python2-pbr +BuildRequires: python2-setuptools + +Requires: python2-babel >= 2.3.4 +Requires: python2-iso8601 >= 0.1.11 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-prettytable >= 0.7.2 +Requires: python2-simplejson >= 3.5.1 +Requires: python2-six >= 1.10.0 + +%description -n python2-%{sname} +%{common_desc} + +%if 0%{?with_python3} +%package -n python3-%{sname} Summary: Python API and CLI for OpenStack Nova %{?python_provide:%python_provide python3-novaclient} -Obsoletes: python2-novaclient < 17.2.1-1 -BuildRequires: git -BuildRequires: openstack-macros BuildRequires: python3-devel BuildRequires: python3-pbr -BuildRequires: python3-pip BuildRequires: python3-setuptools + +Requires: python3-babel >= 2.3.4 Requires: python3-iso8601 >= 0.1.11 -Requires: python3-keystoneauth1 >= 3.5.0 +Requires: python3-keystoneauth1 >= 3.4.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.2 -Requires: python3-stevedore >= 2.0.1 +Requires: python3-simplejson >= 3.5.1 +Requires: python3-six >= 1.10.0 -%description -n python3-novaclient -This is a client for the OpenStack Nova API. There's a Python API (the \ -novaclient module), and a command-line script (nova). Each implements 100% of \ -the OpenStack Nova API. +%description -n python3-%{sname} +%{common_desc} +%endif -%if 0%{?with_doc} %package doc Summary: Documentation for OpenStack Nova API Client -BuildRequires: python3-sphinx -BuildRequires: python3-sphinxcontrib-apidoc -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-oslo-utils -BuildRequires: python3-keystoneauth1 -BuildRequires: python3-oslo-serialization -BuildRequires: python3-prettytable + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-oslo-utils +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-oslo-serialization +BuildRequires: python2-prettytable + %description doc -This is a client for the OpenStack Nova API. There's a Python API (the \ -novaclient module), and a command-line script (nova). Each implements 100% of \ -the OpenStack Nova API. +%{common_desc} + This package contains auto-generated documentation. -%endif %prep -%autosetup -n python-novaclient-17.2.1 -S git +%autosetup -n %{name}-%{upstream_version} -S git + +# Let RPM handle the requirements %py_req_cleanup %build -%{py3_build} +%py2_build +%if 0%{?with_python3} +%py3_build +%endif %install -%{py3_install} -ln -s nova %{buildroot}%{_bindir}/nova-3 +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/nova %{buildroot}%{_bindir}/nova-%{python3_version} +ln -s ./nova-%{python3_version} %{buildroot}%{_bindir}/nova-3 +# Delete tests +rm -fr %{buildroot}%{python3_sitelib}/novaclient/tests +%endif + +%py2_install +mv %{buildroot}%{_bindir}/nova %{buildroot}%{_bindir}/nova-%{python2_version} +ln -s ./nova-%{python2_version} %{buildroot}%{_bindir}/nova-2 + +ln -s ./nova-2 %{buildroot}%{_bindir}/nova + mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d install -pm 644 tools/nova.bash_completion \ %{buildroot}%{_sysconfdir}/bash_completion.d/nova -rm -fr %{buildroot}%{python3_sitelib}/novaclient/tests -%if 0%{?with_doc} -sphinx-build -b html doc/source doc/build/html -sphinx-build -b man doc/source doc/build/man +# Delete tests +rm -fr %{buildroot}%{python2_sitelib}/novaclient/tests + +%{__python2} setup.py build_sphinx -b html +%{__python2} setup.py build_sphinx -b man + install -p -D -m 644 doc/build/man/nova.1 %{buildroot}%{_mandir}/man1/nova.1 -rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo doc/build/html/.htaccess -%endif -%files -n python3-novaclient +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo + +%files -n python2-%{sname} %license LICENSE %doc README.rst -%{python3_sitelib}/novaclient -%{python3_sitelib}/*.egg-info +%{python2_sitelib}/%{sname} +%{python2_sitelib}/*.egg-info %{_sysconfdir}/bash_completion.d -%if 0%{?with_doc} %{_mandir}/man1/nova.1.gz -%endif %{_bindir}/nova +%{_bindir}/nova-2 +%{_bindir}/nova-%{python2_version} + + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{sname} +%{python3_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d +%{_mandir}/man1/nova.1.gz %{_bindir}/nova-3 +%{_bindir}/nova-%{python3_version} +%endif -%if 0%{?with_doc} %files doc %doc doc/build/html %license LICENSE -%endif %changelog -* Thu Jan 12 2021 Python_Bot +* Tue Jun 8 2021 zhangy1317 +- Fix Requires +* Mon May 10 2021 Python_Bot - Package Spec generated