[packages/python-openstacksdk] - updated to 0.39.0

qboosh qboosh at pld-linux.org
Wed Feb 14 21:14:19 CET 2024


commit 47d739eaa1e04566964c0721fb774975df7db056
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Feb 14 21:03:32 2024 +0100

    - updated to 0.39.0

 openstacksdk-collections.patch |  49 +++++++++++++
 python-openstacksdk.spec       | 161 ++++++++++++++++++++++++++++++-----------
 2 files changed, 169 insertions(+), 41 deletions(-)
---
diff --git a/python-openstacksdk.spec b/python-openstacksdk.spec
index 52b989a..c0fc703 100644
--- a/python-openstacksdk.spec
+++ b/python-openstacksdk.spec
@@ -1,63 +1,142 @@
 #
 # Conditional build:
-%bcond_with	doc	# build doc (missing dep)
-%bcond_with	tests	# do perform "make test" (broken)
+%bcond_without	doc	# build doc (missing dep)
+%bcond_with	tests	# unit tests (incomplete dependencies)
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 
 Summary:	An SDK for building applications to work with OpenStack
+Summary(pl.UTF-8):	SDK do budowania aplikacji działających z OpenStack
 Name:		python-openstacksdk
-Version:	0.9.17
-Release:	8
-License:	Apache
+# keep 0.39.x here for python2 support
+Version:	0.39.0
+Release:	1
+License:	Apache v2.0
 Group:		Libraries/Python
 Source0:	https://files.pythonhosted.org/packages/source/o/openstacksdk/openstacksdk-%{version}.tar.gz
-# Source0-md5:	0cd20ab358fd7bc89b874525c58335e2
-URL:		https://pypi.python.org/pypi/openstacksdk/0.9.17
+# Source0-md5:	7398126a03a068b94f2207fa714b47c4
+Patch0:		openstacksdk-collections.patch
+URL:		https://pypi.org/project/openstacksdk/
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
-BuildRequires:	python-pbr >= 2.0.0
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-pbr >= 3.0.0
 BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-PyYAML >= 3.12
+BuildRequires:	python-appdirs >= 1.3.0
+BuildRequires:	python-cryptography >= 2.1
+BuildRequires:	python-ddt >= 1.0.1
+BuildRequires:	python-decorator >= 3.4.0
+BuildRequires:	python-dogpile.cache >= 0.6.5
+BuildRequires:	python-extras >= 1.0.0
+BuildRequires:	python-fixtures >= 3.0.0
+BuildRequires:	python-futures >= 3.0.0
+BuildRequires:	python-ipaddress >= 1.0.17
+BuildRequires:	python-iso8601 >= 0.1.11
+BuildRequires:	python-jmespath >= 0.9.0
+BuildRequires:	python-jsonpatch >= 1.21
+BuildRequires:	python-jsonschema >= 2.0.0
+BuildRequires:	python-keystoneauth1 >= 3.18.0
+BuildRequires:	python-munch >= 2.1.0
+BuildRequires:	python-netifaces >= 0.10.4
+BuildRequires:	python-os-service-types >= 1.7.0
+BuildRequires:	python-oslo.config >= 6.1.0
+BuildRequires:	python-oslotest >= 3.2.0
+BuildRequires:	python-prometheus-client >= 0.4.2
+BuildRequires:	python-requests-mock >= 1.2.0
+BuildRequires:	python-requestsexceptions >= 1.2.0
+BuildRequires:	python-six >= 1.10.0
+BuildRequires:	python-statsd >= 3.3.0
+BuildRequires:	python-stestr >= 1.0.0
+BuildRequires:	python-subunit >= 1.0.0
+BuildRequires:	python-testrepository >= 0.0.18
+BuildRequires:	python-testscenarios >= 0.4
+BuildRequires:	python-testtools >= 2.2.0
+%endif
 %endif
 %if %{with python3}
-BuildRequires:	python3-pbr >= 2.0.0
+BuildRequires:	python3-modules >= 1:3.6
+BuildRequires:	python3-pbr >= 3.0.0
 BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-PyYAML >= 3.12
+BuildRequires:	python3-appdirs >= 1.3.0
+BuildRequires:	python3-cryptography >= 2.1
+BuildRequires:	python3-ddt >= 1.0.1
+BuildRequires:	python3-decorator >= 3.4.0
+BuildRequires:	python3-dogpile.cache >= 0.6.5
+BuildRequires:	python3-extras >= 1.0.0
+BuildRequires:	python3-fixtures >= 3.0.0
+BuildRequires:	python3-iso8601 >= 0.1.11
+BuildRequires:	python3-jmespath >= 0.9.0
+BuildRequires:	python3-jsonpatch >= 1.21
+BuildRequires:	python3-jsonschema >= 2.0.0
+BuildRequires:	python3-keystoneauth1 >= 3.18.0
+BuildRequires:	python3-munch >= 2.1.0
+BuildRequires:	python3-netifaces >= 0.10.4
+BuildRequires:	python3-os-service-types >= 1.7.0
+BuildRequires:	python3-oslo.config >= 6.1.0
+BuildRequires:	python3-oslotest >= 3.2.0
+BuildRequires:	python3-prometheus-client >= 0.4.2
+BuildRequires:	python3-requests-mock >= 1.2.0
+BuildRequires:	python3-requestsexceptions >= 1.2.0
+BuildRequires:	python3-six >= 1.10.0
+BuildRequires:	python3-statsd >= 3.3.0
+BuildRequires:	python3-stestr >= 1.0.0
+BuildRequires:	python3-subunit >= 1.0.0
+BuildRequires:	python3-testrepository >= 0.0.18
+BuildRequires:	python3-testscenarios >= 0.4
+BuildRequires:	python3-testtools >= 2.2.0
+%endif
+%endif
+%if %{with doc}
+BuildRequires:	python3-bs4 >= 4.6.0
+BuildRequires:	python3-docutils >= 0.11
+BuildRequires:	python3-dogpile.cache >= 0.6.5
+BuildRequires:	python3-keystoneauth1 >= 3.18.0
+BuildRequires:	python3-munch >= 2.1.0
+BuildRequires:	python3-openstackdocstheme >= 1.20.0
+BuildRequires:	python3-reno >= 2.5.0
+BuildRequires:	python3-requestsexceptions >= 1.2.0
+BuildRequires:	python3-sphinxcontrib-svg2pdfconverter >= 0.1.0
+BuildRequires:	sphinx-pdg-3 >= 2.1.1
 %endif
-Requires:	python-deprecation >= 1.0
-Requires:	python-jsonpatch >= 1.1
-Requires:	python-keystoneauth1 >= 2.21.0
-Requires:	python-pbr >= 2.0.0
-Requires:	python-six >= 1.9.0
-Requires:	python-stevedore >= 1.20.0
-Requires:	python-os-client-config >= 1.27.0
+Requires:	python-modules >= 1:2.7
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-The python-openstacksdk is a collection of libraries for building
+Python openstacksdk package is a collection of libraries for building
 applications to work with OpenStack clouds. The project aims to
 provide a consistent and complete set of interactions with OpenStack's
 many services, along with complete documentation, examples, and tools.
 
+%description -l pl.UTF-8
+Pakiet Pythona openstacksdk to zbiór bibliotek do budowania aplikacji
+działających z chmurami OpenStack. Celem projektu jest zapewnienie
+spójnego i kompletnego zbioru interakcji z wieloma usługami OpenStack
+wraz z pełną dokumentacją, przykładami i narzędziami.
+
 %package -n python3-openstacksdk
 Summary:	An SDK for building applications to work with OpenStack
+Summary(pl.UTF-8):	SDK do budowania aplikacji działających z OpenStack
 Group:		Libraries/Python
-Requires:	python3-deprecation >= 1.0
-Requires:	python3-jsonpatch >= 1.1
-Requires:	python3-keystoneauth1 >= 2.21.0
-Requires:	python3-modules
-Requires:	python3-pbr >= 2.0.0
-Requires:	python3-six >= 1.9.0
-Requires:	python3-stevedore >= 1.20.0
-Requires:	python3-os-client-config >= 1.27.0
+Requires:	python3-modules >= 1:3.6
 
 %description -n python3-openstacksdk
-The python-openstacksdk is a collection of libraries for building
+Python openstacksdk package is a collection of libraries for building
 applications to work with OpenStack clouds. The project aims to
 provide a consistent and complete set of interactions with OpenStack's
 many services, along with complete documentation, examples, and tools.
 
+%description -n python3-openstacksdk -l pl.UTF-8
+Pakiet Pythona openstacksdk to zbiór bibliotek do budowania aplikacji
+działających z chmurami OpenStack. Celem projektu jest zapewnienie
+spójnego i kompletnego zbioru interakcji z wieloma usługami OpenStack
+wraz z pełną dokumentacją, przykładami i narzędziami.
+
 %package apidocs
 Summary:	API documentation for Python openstacksdk module
 Summary(pl.UTF-8):	Dokumentacja API modułu Pythona openstacksdk
@@ -71,6 +150,7 @@ Dokumentacja API modułu Pythona openstacksdk.
 
 %prep
 %setup -q -n openstacksdk-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
@@ -82,9 +162,7 @@ Dokumentacja API modułu Pythona openstacksdk.
 %endif
 
 %if %{with doc}
-cd doc
-%{__make} -j1 html
-rm -rf _build/html/_sources
+sphinx-build-3 -b html doc/source doc/build/html
 %endif
 
 %install
@@ -93,31 +171,29 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %py_install
 
-# when files are installed in other way that standard 'setup.py
-# they need to be (re-)compiled
-# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-
 %py_postclean
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/openstack/tests
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/openstack-inventory{,-2}
 %endif
 
 %if %{with python3}
 %py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/openstack/tests
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/openstack-inventory{,-3}
+ln -sf openstack-inventory-3 $RPM_BUILD_ROOT%{_bindir}/openstack-inventory
 %endif
 
-# in case there are examples provided
 %if %{with python2}
 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-openstacksdk-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-openstacksdk-%{version}
-find $RPM_BUILD_ROOT%{_examplesdir}/python-openstacksdk-%{version} -name '*.py' \
-	| xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
 %endif
+
 %if %{with python3}
 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-openstacksdk-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-openstacksdk-%{version}
-find $RPM_BUILD_ROOT%{_examplesdir}/python3-openstacksdk-%{version} -name '*.py' \
-	| xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
 %endif
 
 %clean
@@ -127,6 +203,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README.rst
+%attr(755,root,root) %{_bindir}/openstack-inventory-2
 %{py_sitescriptdir}/openstack
 %{py_sitescriptdir}/openstacksdk-%{version}-py*.egg-info
 %{_examplesdir}/python-openstacksdk-%{version}
@@ -136,6 +213,8 @@ rm -rf $RPM_BUILD_ROOT
 %files -n python3-openstacksdk
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README.rst
+%attr(755,root,root) %{_bindir}/openstack-inventory
+%attr(755,root,root) %{_bindir}/openstack-inventory-3
 %{py3_sitescriptdir}/openstack
 %{py3_sitescriptdir}/openstacksdk-%{version}-py*.egg-info
 %{_examplesdir}/python3-openstacksdk-%{version}
@@ -144,5 +223,5 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with doc}
 %files apidocs
 %defattr(644,root,root,755)
-%doc doc/_build/html/*
+%doc doc/build/html/{_static,contributor,install,user,*.html,*.js}
 %endif
diff --git a/openstacksdk-collections.patch b/openstacksdk-collections.patch
new file mode 100644
index 0000000..3383b8e
--- /dev/null
+++ b/openstacksdk-collections.patch
@@ -0,0 +1,49 @@
+--- openstacksdk-0.39.0/openstack/orchestration/util/template_utils.py.orig	2019-12-09 10:52:37.000000000 +0100
++++ openstacksdk-0.39.0/openstack/orchestration/util/template_utils.py	2024-02-14 20:13:01.732527802 +0100
+@@ -12,9 +12,9 @@
+ # License for the specific language governing permissions and limitations
+ # under the License.
+ 
+-import collections
+ import json
+ import six
++from six.moves import collections_abc
+ from six.moves.urllib import parse
+ from six.moves.urllib import request
+ 
+@@ -151,7 +151,7 @@ def deep_update(old, new):
+         old = {}
+ 
+     for k, v in new.items():
+-        if isinstance(v, collections.Mapping):
++        if isinstance(v, collections_abc.Mapping):
+             r = deep_update(old.get(k, {}), v)
+             old[k] = r
+         else:
+--- openstacksdk-0.39.0/openstack/resource.py.orig	2019-12-09 10:52:37.000000000 +0100
++++ openstacksdk-0.39.0/openstack/resource.py	2024-02-14 20:13:42.505640249 +0100
+@@ -31,7 +31,6 @@ converted into this Resource class' appr
+ and then returned to the caller.
+ """
+ 
+-import collections
+ import inspect
+ import itertools
+ 
+@@ -42,6 +41,7 @@ from keystoneauth1 import discover
+ import munch
+ from requests import structures
+ import six
++from six.moves import collections_abc
+ 
+ from openstack import _log
+ from openstack import exceptions
+@@ -207,7 +207,7 @@ class Computed(_BaseComponent):
+     key = "_computed"
+ 
+ 
+-class _ComponentManager(collections.MutableMapping):
++class _ComponentManager(collections_abc.MutableMapping):
+     """Storage of a component type"""
+ 
+     def __init__(self, attributes=None, synchronized=False):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-openstacksdk.git/commitdiff/47d739eaa1e04566964c0721fb774975df7db056



More information about the pld-cvs-commit mailing list