[packages/python-pywbem] - updated to 1.6.2; wbemcli moved to pywbemtools

qboosh qboosh at pld-linux.org
Sat Apr 20 16:10:09 CEST 2024


commit f62693b5d9ab2e00c522800a6183e90078d1a63c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Apr 20 15:30:31 2024 +0200

    - updated to 1.6.2; wbemcli moved to pywbemtools

 python-pywbem.spec     | 17 +++----------
 pywbem-mock.patch      | 66 --------------------------------------------------
 pywbem-no-wheel.patch  | 15 ++++++++++++
 pywbem-threading.patch | 11 ---------
 4 files changed, 18 insertions(+), 91 deletions(-)
---
diff --git a/python-pywbem.spec b/python-pywbem.spec
index 6794bdd..3407522 100644
--- a/python-pywbem.spec
+++ b/python-pywbem.spec
@@ -9,15 +9,14 @@
 Summary:	WBEM client and related utilities, written in pure Python
 Summary(pl.UTF-8):	Klient WBEM i powiązane narzędzia, napisane w czystym Pythonie
 Name:		python-pywbem
-Version:	0.17.6
+Version:	1.6.2
 Release:	1
 License:	LGPL v2.1+
 Group:		Libraries/Python
 #Source0Download: https://github.com/pywbem/pywbem/releases
 Source0:	https://github.com/pywbem/pywbem/archive/%{version}/pywbem-%{version}.tar.gz
-# Source0-md5:	af567dee3476334a232d8e5ccb7db632
-Patch0:		pywbem-mock.patch
-Patch1:		pywbem-threading.patch
+# Source0-md5:	de074ebc8992261ab65ae1fcc916d3ce
+Patch0:		pywbem-no-wheel.patch
 URL:		https://github.com/pywbem/pywbem
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.7
@@ -111,7 +110,6 @@ Dokumentacja API modułu Pythona pywbem.
 %prep
 %setup -q -n pywbem-%{version}
 %patch0 -p1
-%patch1 -p1
 
 %{__sed} -i -e 's/\.\. git_changelog::/(missing git changelog)/' docs/changes.rst
 
@@ -151,8 +149,6 @@ install -d $RPM_BUILD_ROOT%{_examplesdir}
 %py_install
 
 %{__mv} $RPM_BUILD_ROOT%{_bindir}/mof_compiler{,-2}
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/wbemcli{,-2}
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/wbemcli.py $RPM_BUILD_ROOT%{py_sitescriptdir}
 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
 
@@ -166,8 +162,6 @@ cp -pr examples $RPM_BUILD_ROOT%{_examplesdir}/python-pywbem-%{version}
 %py3_install
 
 %{__mv} $RPM_BUILD_ROOT%{_bindir}/mof_compiler{,-3}
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/wbemcli{,-3}
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/wbemcli.py $RPM_BUILD_ROOT%{py3_sitescriptdir}
 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
 
@@ -185,8 +179,6 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc README.rst TODO.md
 %attr(755,root,root) %{_bindir}/mof_compiler-2
-%attr(755,root,root) %{_bindir}/wbemcli-2
-%{py_sitescriptdir}/wbemcli.py[co]
 %{py_sitescriptdir}/pywbem
 %{py_sitescriptdir}/pywbem_mock
 %{py_sitescriptdir}/pywbem-%{version}-py*.egg-info
@@ -198,9 +190,6 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc README.rst TODO.md
 %attr(755,root,root) %{_bindir}/mof_compiler-3
-%attr(755,root,root) %{_bindir}/wbemcli-3
-%{py3_sitescriptdir}/wbemcli.py
-%{py3_sitescriptdir}/__pycache__/wbemcli.cpython-*.py[co]
 %{py3_sitescriptdir}/pywbem
 %{py3_sitescriptdir}/pywbem_mock
 %{py3_sitescriptdir}/pywbem-%{version}-py*.egg-info
diff --git a/pywbem-mock.patch b/pywbem-mock.patch
deleted file mode 100644
index ecb6bdf..0000000
--- a/pywbem-mock.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- pywbem-0.17.6/pywbem_mock/_wbemconnection_mock.py.orig	2020-10-05 23:09:31.000000000 +0200
-+++ pywbem-0.17.6/pywbem_mock/_wbemconnection_mock.py	2022-04-28 16:52:34.495189422 +0200
-@@ -40,7 +40,10 @@ try:
-     from collections import Counter
- except ImportError:
-     from backport_collections import Counter
--from mock import Mock
-+try:
-+    from mock import Mock
-+except ImportError:
-+    from unittest.mock import Mock
- import six
- 
- # pylint: disable=ungrouped-imports
---- pywbem-0.17.6/tests/unittest/pywbem/test_cim_obj.py.orig	2020-10-05 23:09:31.000000000 +0200
-+++ pywbem-0.17.6/tests/unittest/pywbem/test_cim_obj.py	2022-04-28 17:07:31.159025596 +0200
-@@ -9,7 +9,10 @@ from __future__ import absolute_import,
- import sys
- import re
- from datetime import timedelta, datetime
--from mock import patch
-+try:
-+    from mock import patch
-+except ImportError:
-+    from unittest.mock import patch
- try:
-     from collections import OrderedDict
- except ImportError:
---- pywbem-0.17.6/tests/unittest/pywbem/test_itermethods.py.orig	2020-10-05 23:09:31.000000000 +0200
-+++ pywbem-0.17.6/tests/unittest/pywbem/test_itermethods.py	2022-04-28 17:07:54.975230679 +0200
-@@ -24,7 +24,10 @@ from __future__ import absolute_import,
- import pytest
- import six
- 
--from mock import Mock
-+try:
-+    from mock import Mock
-+except ImportError:
-+    from unittest.mock import Mock
- 
- # pylint: disable=wrong-import-position, wrong-import-order, invalid-name
- from ...utils import import_installed
---- pywbem-0.17.6/tests/unittest/pywbem/test_valuemapping.py.orig	2020-10-05 23:09:31.000000000 +0200
-+++ pywbem-0.17.6/tests/unittest/pywbem/test_valuemapping.py	2022-04-28 17:08:21.532885981 +0200
-@@ -7,7 +7,10 @@ from __future__ import absolute_import
- 
- import re
- import pytest
--from mock import Mock
-+try:
-+    from mock import Mock
-+except ImportError:
-+    from unittest.mock import Mock
- 
- # pylint: disable=wrong-import-position, wrong-import-order, invalid-name
- from ...utils import import_installed
---- pywbem-0.17.6/requirements.txt.orig	2020-10-05 23:09:31.000000000 +0200
-+++ pywbem-0.17.6/requirements.txt	2022-04-28 17:21:40.728745549 +0200
-@@ -13,7 +13,6 @@
- M2Crypto>=0.31.0; python_version < '3.0' and sys_platform != 'win32'
- mock>=2.0.0,<3.0.0; python_version == '2.6'
- mock>=2.0.0,<4.0.0; python_version >= '2.7' and python_version <= '3.5'
--mock>=2.0.0; python_version >= '3.6'
- ordereddict>=1.1; python_version == '2.6'
- ply>=3.10
- # PyYAML 5.3 has removed support for Python 3.4; fixes narrow build error
diff --git a/pywbem-no-wheel.patch b/pywbem-no-wheel.patch
new file mode 100644
index 0000000..c4debc1
--- /dev/null
+++ b/pywbem-no-wheel.patch
@@ -0,0 +1,15 @@
+--- pywbem-1.6.2/setup.py.orig	2023-08-21 13:17:29.000000000 +0200
++++ pywbem-1.6.2/setup.py	2023-09-28 20:44:04.250106035 +0200
+@@ -230,11 +230,7 @@ class bdist_wheel(bdist_wheel_base):
+     The handling of the option is in the module level code because it needs
+     to change the setuptools.setup() arguments.
+     """
+-    if bdist_wheel_base is object:
+-        raise ImportError("wheel package is not installed and bdist_wheel "
+-                          "command is used")
+-
+-    user_options = bdist_wheel_base.user_options + [
++    user_options = getattr(bdist_wheel_base, "user_options", []) + [
+         # (long option, short option, description)
+         ('cythonized', None,
+          'pywbem: Make a cythonized wheel (default: uncythonized wheel)'),
diff --git a/pywbem-threading.patch b/pywbem-threading.patch
deleted file mode 100644
index d43e239..0000000
--- a/pywbem-threading.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- pywbem-0.17.6/tests/functiontest/conftest.py.orig	2020-10-05 23:09:31.000000000 +0200
-+++ pywbem-0.17.6/tests/functiontest/conftest.py	2022-04-28 16:37:35.253071130 +0200
-@@ -207,7 +207,7 @@ def patched_makefile(self, mode='r', buf
-         else:
-             timeout = self.timeout
-         t.join(timeout)
--        if t.isAlive():
-+        if t.is_alive():
-             raise socket.timeout
- 
-     return self.fd
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pywbem.git/commitdiff/f62693b5d9ab2e00c522800a6183e90078d1a63c



More information about the pld-cvs-commit mailing list