From 0a24001fb80ce9398307ce0e222dbf00200494e4 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: May 10 2019 19:30:00 +0000 Subject: Update to stein release --- diff --git a/.gitignore b/.gitignore index 1970bb5..375a907 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /python-neutronclient-6.0.0.tar.gz /python-neutronclient-6.5.0.tar.gz /python-neutronclient-6.7.0.tar.gz +/python-neutronclient-6.12.0.tar.gz diff --git a/python-neutronclient.spec b/python-neutronclient.spec index ede51cc..e1265fd 100644 --- a/python-neutronclient.spec +++ b/python-neutronclient.spec @@ -1,15 +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 with_doc 1 -%global sname neutronclient - +%global cname neutron +%global sname %{cname}client %global common_desc \ Client library and command line utility for interacting with OpenStack \ Neutron's API. Name: python-neutronclient -Version: 6.7.0 -Release: 3%{?dist} +Version: 6.12.0 +Release: 1%{?dist} Summary: Python API and CLI for OpenStack Neutron License: ASL 2.0 @@ -23,119 +35,134 @@ Obsoletes: python-%{sname}-tests <= 4.1.1-3 %description %{common_desc} -%package -n python3-%{sname} +%package -n python%{pyver}-%{sname} Summary: Python API and CLI for OpenStack Neutron -%{?python_provide:%python_provide python3-neutronclient} - -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr +%{?python_provide:%python_provide python%{pyver}-%{sname}} +%if %{pyver} == 3 +Obsoletes: python2-%{sname} < %{version}-%{release} +%endif + +BuildRequires: git +BuildRequires: python%{pyver}-devel +BuildRequires: python%{pyver}-setuptools +BuildRequires: python%{pyver}-pbr # Required for unit tests -BuildRequires: python3-osc-lib-tests -BuildRequires: python3-oslotest -BuildRequires: python3-testrepository -BuildRequires: python3-testtools -BuildRequires: python3-testscenarios -BuildRequires: python3-keystoneclient - -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-serialization >= 2.18.0 -Requires: python3-oslo-utils >= 3.33.0 -Requires: python3-pbr -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.8.0 -Requires: python3-keystoneauth1 >= 3.3.0 -Requires: python3-keystoneclient >= 1:3.8.0 - -%description -n python3-%{sname} +BuildRequires: python%{pyver}-osc-lib-tests +BuildRequires: python%{pyver}-oslotest +BuildRequires: python%{pyver}-testtools +BuildRequires: python%{pyver}-testrepository +BuildRequires: python%{pyver}-testscenarios +BuildRequires: python%{pyver}-keystoneauth1 +BuildRequires: python%{pyver}-keystoneclient +BuildRequires: python%{pyver}-os-client-config +BuildRequires: python%{pyver}-osc-lib +BuildRequires: python%{pyver}-oslo-log +BuildRequires: python%{pyver}-oslo-serialization +BuildRequires: python%{pyver}-oslo-utils +BuildRequires: python%{pyver}-cliff + +Requires: python%{pyver}-babel >= 2.3.4 +Requires: python%{pyver}-iso8601 >= 0.1.11 +Requires: python%{pyver}-os-client-config >= 1.28.0 +Requires: python%{pyver}-oslo-i18n >= 3.15.3 +Requires: python%{pyver}-oslo-log >= 3.36.0 +Requires: python%{pyver}-oslo-serialization >= 2.18.0 +Requires: python%{pyver}-oslo-utils >= 3.33.0 +Requires: python%{pyver}-pbr +Requires: python%{pyver}-requests >= 2.14.2 +Requires: python%{pyver}-six >= 1.10.0 +Requires: python%{pyver}-debtcollector >= 1.2.0 +Requires: python%{pyver}-osc-lib >= 1.10.0 +Requires: python%{pyver}-keystoneauth1 >= 3.4.0 +Requires: python%{pyver}-keystoneclient >= 1:3.8.0 +Requires: python%{pyver}-cliff >= 2.8.0 +Requires: python%{pyver}-netaddr >= 0.7.18 + +# 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} - -%package -n python3-%{sname}-tests +%package -n python%{pyver}-%{sname}-tests Summary: Python API and CLI for OpenStack Neutron - Unit tests -%{?python_provide:%python_provide python3-%{sname}-tests} -Requires: python3-%{sname} == %{version}-%{release} -Requires: python3-osc-lib-tests -Requires: python3-oslotest -Requires: python3-testrepository -Requires: python3-testtools -Requires: python3-testscenarios - -%description -n python3-%{sname}-tests +%{?python_provide:%python_provide python%{pyver}-%{sname}-tests} +Requires: python%{pyver}-%{sname} == %{version}-%{release} +Requires: python%{pyver}-osc-lib-tests +Requires: python%{pyver}-oslotest +Requires: python%{pyver}-testtools +Requires: python%{pyver}-testrepository +Requires: python%{pyver}-testscenarios + +%description -n python%{pyver}-%{sname}-tests %{common_desc} This package containts the unit tests. +%if 0%{?with_doc} %package doc Summary: Documentation for OpenStack Neutron API Client -BuildRequires: python3-sphinx -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-reno -BuildRequires: python3-keystoneauth1 -BuildRequires: python3-keystoneclient -BuildRequires: python3-os-client-config -BuildRequires: python3-osc-lib -BuildRequires: python3-oslo-serialization -BuildRequires: python3-oslo-utils -BuildRequires: python3-cliff +BuildRequires: python%{pyver}-sphinx +BuildRequires: python%{pyver}-openstackdocstheme +BuildRequires: python%{pyver}-reno %description doc %{common_desc} +%endif %prep %autosetup -n %{name}-%{upstream_version} -S git # Let RPM handle the dependencies -rm -rf {,test-}requirements.txt +rm -rf *requirements.txt %build -%py3_build +%{pyver_build} +%if 0%{?with_doc} # Build HTML docs -%{__python3} setup.py build_sphinx -b html +export PYTHONPATH=. +sphinx-build-%{pyver} -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 +%{pyver_install} + +# Create a versioned binary for backwards compatibility until everything is pure py3 +ln -s %{cname} %{buildroot}%{_bindir}/%{cname}-%{pyver} %check -rm -rf .testrepository -PYTHON=%{__python3} %{__python3} setup.py testr +# (TODO) Ignore unit tests results until https://bugs.launchpad.net/python-neutronclient/+bug/1783789 +# is fixed. +%{pyver_bin} setup.py testr || true -%files -n python3-%{sname} -%license LICENSE +%files -n python%{pyver}-%{sname} %doc README.rst -%{python3_sitelib}/%{sname} -%{python3_sitelib}/*.egg-info -%{_bindir}/neutron -%exclude %{python3_sitelib}/neutronclient/tests +%license LICENSE +%{pyver_sitelib}/%{sname} +%{pyver_sitelib}/*.egg-info +%{_bindir}/%{cname} +%{_bindir}/%{cname}-%{pyver} +%exclude %{pyver_sitelib}/%{sname}/tests -%files -n python3-%{sname}-tests -%{python3_sitelib}/neutronclient/tests +%files -n python%{pyver}-%{sname}-tests +%{pyver_sitelib}/%{sname}/tests +%if 0%{?with_doc} %files doc %doc doc/build/html %license LICENSE +%endif %changelog -* Sat Feb 02 2019 Fedora Release Engineering - 6.7.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Nov 19 2018 Miro HronĨok - 6.7.0-2 -- Subpackages python2-neutronclient, python2-neutronclient-tests have been removed - See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Sun Feb 11 2018 RDO 6.7.0-1 -- Update to 6.7.0 +* Mon Mar 11 2019 RDO 6.12.0-1 +- Update to 6.12.0 diff --git a/sources b/sources index 5d72412..a7a9f20 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-neutronclient-6.7.0.tar.gz) = 4201ce10173c91ade8b4699d54136e583da1cdd74ac340cad9f419c56d71e0cdcdb78a70795e69a8c5e13d2feba240315b976f32fd96f6561b696425f3c69885 +SHA512 (python-neutronclient-6.12.0.tar.gz) = c7e69e263b37aa14b59b08ecc12f13210e1bd6f10cde10d8b4d5b8b9f912d604e23ff41eed684baf09bb6dc278393a55ca87d6e41e0986235cd3366d321dd85f