diff --git a/python-neutronclient-6.9.1.tar.gz b/python-neutronclient-6.9.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..690cfa8731a857480b0d18ea60215c4a050b664c Binary files /dev/null and b/python-neutronclient-6.9.1.tar.gz differ diff --git a/python-neutronclient-7.2.1.tar.gz b/python-neutronclient-7.2.1.tar.gz deleted file mode 100644 index 5c3344c294298b4ad5bf8434cdd6ffdd38c63c24..0000000000000000000000000000000000000000 Binary files a/python-neutronclient-7.2.1.tar.gz and /dev/null differ diff --git a/python-neutronclient.spec b/python-neutronclient.spec index 21b6997a8f96e6c56ca6e3ef5fca306c420048e7..2156d68d2396a53b708ba8b4e69b9de572af7831 100644 --- a/python-neutronclient.spec +++ b/python-neutronclient.spec @@ -1,129 +1,222 @@ -%global _empty_manifest_terminate_build 0 -%global with_doc 1 +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname neutronclient + +%global with_python3 0 + +%global common_desc \ +Client library and command line utility for interacting with OpenStack \ +Neutron's API. Name: python-neutronclient -Version: 7.2.1 -Release: 2%{?dist} +Version: 6.9.1 +Release: 1 Summary: Python API and CLI for OpenStack Neutron License: Apache-2.0 -URL: http://launchpad.net/python-neutronclient/ -Source0: https://tarballs.openstack.org/python-neutronclient/python-neutronclient-7.2.1.tar.gz +URL: http://launchpad.net/%{name}/ +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + BuildArch: noarch + +Obsoletes: python-%{sname}-tests <= 4.1.1-3 + %description -Client library and command line utility for interacting with OpenStack Neutron's API +%{common_desc} -%package -n python3-neutronclient +%package -n python2-%{sname} Summary: Python API and CLI for OpenStack Neutron -%{?python_provide:%python_provide python3-neutronclient} -Obsoletes: python2-neutronclient < 7.2.1-2 -Obsoletes: python-neutronclient-tests <= 4.1.1-3 +%{?python_provide:%python_provide python2-neutronclient} BuildRequires: git BuildRequires: openstack-macros +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr +# Required for unit tests +BuildRequires: python2-osc-lib-tests +BuildRequires: python2-oslotest +BuildRequires: python2-testtools +BuildRequires: python2-testrepository +BuildRequires: python2-testscenarios + +Requires: python2-babel >= 2.3.4 +Requires: python2-iso8601 >= 0.1.11 +Requires: python2-os-client-config >= 1.28.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-log >= 3.36.0 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pbr +Requires: python2-requests >= 2.14.2 +Requires: python2-six >= 1.10.0 +Requires: python2-debtcollector >= 1.2.0 +Requires: python2-osc-lib >= 1.10.0 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-keystoneclient >= 1:3.8.0 +Requires: python2-cliff >= 2.8.0 +Requires: python2-netaddr >= 0.7.18 +Requires: python2-simplejson >= 3.5.1 + +%description -n python2-%{sname} +%{common_desc} + +%package -n python2-%{sname}-tests +Summary: Python API and CLI for OpenStack Neutron - Unit tests +%{?python_provide:%python_provide python2-%{sname}-tests} +Requires: python2-%{sname} == %{version}-%{release} +Requires: python2-osc-lib-tests +Requires: python2-oslotest +Requires: python2-testtools +Requires: python2-testrepository +Requires: python2-testscenarios + +%description -n python2-%{sname}-tests +%{common_desc} + +This package containts the unit tests. + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Python API and CLI for OpenStack Neutron +%{?python_provide:%python_provide python3-neutronclient} + BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pbr -BuildRequires: python3-pip -BuildRequires: python3-osc-lib +# Required for unit tests BuildRequires: python3-osc-lib-tests BuildRequires: python3-oslotest -BuildRequires: python3-testtools BuildRequires: python3-testrepository +BuildRequires: python3-testtools BuildRequires: python3-testscenarios -BuildRequires: python3-keystoneauth1 -BuildRequires: python3-keystoneclient -BuildRequires: python3-os-client-config -BuildRequires: python3-oslo-log -BuildRequires: python3-oslo-serialization -BuildRequires: python3-oslo-utils -BuildRequires: python3-cliff - -Requires: python3-iso8601 -Requires: python3-os-client-config -Requires: python3-oslo-i18n -Requires: python3-oslo-log -Requires: python3-oslo-serialization -Requires: python3-oslo-utils + +Requires: python3-babel >= 2.3.4 +Requires: python3-cliff >= 2.8.0 +Requires: python3-iso8601 >= 0.1.11 +Requires: python3-netaddr >= 0.7.18 +Requires: python3-os-client-config >= 1.28.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-log >= 3.36.0 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 Requires: python3-pbr -Requires: python3-requests -Requires: python3-debtcollector -Requires: python3-osc-lib -Requires: python3-keystoneauth1 -Requires: python3-keystoneclient -Requires: python3-cliff -Requires: python3-netaddr -Requires: python3-simplejson - -%description -n python3-neutronclient -Client library and command line utility for interacting with OpenStack Neutron's API - -%package -n python3-neutronclient-tests +Requires: python3-requests >= 2.14.2 +Requires: python3-simplejson >= 3.5.1 +Requires: python3-six >= 1.10.0 +Requires: python3-debtcollector >= 1.2.0 +Requires: python3-osc-lib >= 1.10.0 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-keystoneclient >= 1:3.8.0 + +%description -n python3-%{sname} +%{common_desc} + + +%package -n python3-%{sname}-tests Summary: Python API and CLI for OpenStack Neutron - Unit tests -%{?python_provide:%python_provide python3-neutronclient-tests} -Requires: python3-neutronclient == %{version}-%{release} +%{?python_provide:%python_provide python3-%{sname}-tests} +Requires: python3-%{sname} == %{version}-%{release} Requires: python3-osc-lib-tests Requires: python3-oslotest -Requires: python3-testtools Requires: python3-testrepository +Requires: python3-testtools Requires: python3-testscenarios -%description -n python3-neutronclient-tests -Client library and command line utility for interacting with OpenStack Neutron's API +%description -n python3-%{sname}-tests +%{common_desc} This package containts the unit tests. +%endif -%if 0%{?with_doc} %package doc Summary: Documentation for OpenStack Neutron API Client -BuildRequires: python3-sphinx -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-reno +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-reno +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-keystoneclient +BuildRequires: python2-os-client-config +BuildRequires: python2-osc-lib +BuildRequires: python2-oslo-serialization +BuildRequires: python2-oslo-utils +BuildRequires: python2-cliff %description doc -Client library and command line utility for interacting with OpenStack Neutron's API -%endif +%{common_desc} %prep -%autosetup -n python-neutronclient-7.2.1 -S git +%autosetup -n %{name}-%{upstream_version} -S git + +# Let RPM handle the dependencies %py_req_cleanup %build -%{py3_build} +%py2_build +%if 0%{?with_python3} +%py3_build +%endif -%if 0%{?with_doc} +# Build HTML docs export PYTHONPATH=. sphinx-build -W -b html doc/source doc/build/html + +# Fix hidden-file-or-dir warnings rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo -%endif %install -%{py3_install} +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/neutron %{buildroot}%{_bindir}/neutron-%{python3_version} +ln -s ./neutron-%{python3_version} %{buildroot}%{_bindir}/neutron-3 +%endif -ln -s neutron %{buildroot}%{_bindir}/neutron-3 +%py2_install +mv %{buildroot}%{_bindir}/neutron %{buildroot}%{_bindir}/neutron-%{python2_version} +ln -s ./neutron-%{python2_version} %{buildroot}%{_bindir}/neutron-2 +ln -s ./neutron-2 %{buildroot}%{_bindir}/neutron %check +# (TODO) Ignore unit tests results until https://bugs.launchpad.net/python-neutronclient/+bug/1783789 +# is fixed. +%{__python2} setup.py testr || true +%if 0%{?with_python3} +rm -rf .testrepository %{__python3} setup.py testr || true +%endif -%files -n python3-neutronclient +%files -n python2-%{sname} %doc README.rst %license LICENSE -%{python3_sitelib}/neutronclient -%{python3_sitelib}/*.egg-info +%{python2_sitelib}/neutronclient +%{python2_sitelib}/*.egg-info %{_bindir}/neutron +%{_bindir}/neutron-2 +%{_bindir}/neutron-%{python2_version} +%exclude %{python2_sitelib}/neutronclient/tests + +%files -n python2-%{sname}-tests +%{python2_sitelib}/neutronclient/tests + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{sname} +%{python3_sitelib}/*.egg-info %{_bindir}/neutron-3 +%{_bindir}/neutron-%{python3_version} %exclude %{python3_sitelib}/neutronclient/tests -%files -n python3-neutronclient-tests +%files -n python3-%{sname}-tests %{python3_sitelib}/neutronclient/tests +%endif -%if 0%{?with_doc} %files doc %doc doc/build/html %license LICENSE -%endif %changelog -* Thu Jan 12 2021 Python_Bot +* Mon May 10 2021 Python_Bot - Package Spec generated