forked from pool/python-wxPython
Accepting request 1063155 from X11:wxWidgets
OBS-URL: https://build.opensuse.org/request/show/1063155 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wxPython?expand=0&rev=17
This commit is contained in:
commit
10069f05c2
61
0001-pypubsub-Replace-deprecated-inspect.getargspec.patch
Normal file
61
0001-pypubsub-Replace-deprecated-inspect.getargspec.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
From 9986a0d5c24b5d45ddf571d60351f68765a8a9be Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Talbert <swt@techie.net>
|
||||||
|
Date: Mon, 8 Aug 2022 22:35:58 -0400
|
||||||
|
Subject: [PATCH] pypubsub: Replace deprecated inspect.getargspec
|
||||||
|
|
||||||
|
inspect.getargspec was removed in Python 3.11. This is a backport of:
|
||||||
|
https://github.com/schollii/pypubsub/commit/089c7a73f85c76a3aa22e4b10c71db1bf65a8637
|
||||||
|
---
|
||||||
|
wx/lib/pubsub/core/callables.py | 23 +++++++++++++++--------
|
||||||
|
1 file changed, 15 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/wx/lib/pubsub/core/callables.py b/wx/lib/pubsub/core/callables.py
|
||||||
|
index 65eb1ebe..7e798c54 100644
|
||||||
|
--- a/wx/lib/pubsub/core/callables.py
|
||||||
|
+++ b/wx/lib/pubsub/core/callables.py
|
||||||
|
@@ -12,7 +12,7 @@ CallArgsInfo regarding its autoTopicArgName data member.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
-from inspect import getargspec, ismethod, isfunction
|
||||||
|
+from inspect import ismethod, isfunction, signature, Parameter
|
||||||
|
|
||||||
|
from .. import py2and3
|
||||||
|
|
||||||
|
@@ -133,19 +133,26 @@ class CallArgsInfo:
|
||||||
|
self.autoTopicArgName = None."""
|
||||||
|
|
||||||
|
#args, firstArgIdx, defaultVals, acceptsAllKwargs
|
||||||
|
- (allParams, varParamName, varOptParamName, defaultVals) = getargspec(func)
|
||||||
|
- if defaultVals is None:
|
||||||
|
- defaultVals = []
|
||||||
|
- else:
|
||||||
|
- defaultVals = list(defaultVals)
|
||||||
|
+ allParams = []
|
||||||
|
+ defaultVals = []
|
||||||
|
+ varParamName = None
|
||||||
|
+ varOptParamName = None
|
||||||
|
+ for argName, param in signature(func).parameters.items():
|
||||||
|
+ if param.default != Parameter.empty:
|
||||||
|
+ defaultVals.append(param.default)
|
||||||
|
+ if param.kind == Parameter.VAR_POSITIONAL:
|
||||||
|
+ varParamName = argName
|
||||||
|
+ elif param.kind == Parameter.VAR_KEYWORD:
|
||||||
|
+ varOptParamName = argName
|
||||||
|
+ else:
|
||||||
|
+ allParams.append(argName)
|
||||||
|
|
||||||
|
self.acceptsAllKwargs = (varOptParamName is not None)
|
||||||
|
self.acceptsAllUnnamedArgs = (varParamName is not None)
|
||||||
|
-
|
||||||
|
self.allParams = allParams
|
||||||
|
- del self.allParams[0:firstArgIdx] # does nothing if firstArgIdx == 0
|
||||||
|
|
||||||
|
self.numRequired = len(self.allParams) - len(defaultVals)
|
||||||
|
+ assert len(self.allParams) >= len(defaultVals)
|
||||||
|
assert self.numRequired >= 0
|
||||||
|
|
||||||
|
# if listener wants topic, remove that arg from args/defaultVals
|
||||||
|
--
|
||||||
|
2.39.0
|
||||||
|
|
35
ba0d8cfcec3d3b0112d1c54991853e6003f2fbf6.patch
Normal file
35
ba0d8cfcec3d3b0112d1c54991853e6003f2fbf6.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From ba0d8cfcec3d3b0112d1c54991853e6003f2fbf6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Talbert <swt@techie.net>
|
||||||
|
Date: Mon, 7 Nov 2022 11:49:27 -0500
|
||||||
|
Subject: [PATCH] wscript: Use EXT_SUFFIX when available to fix build on Py
|
||||||
|
3.11
|
||||||
|
|
||||||
|
This is a backport of a an upstream fix in waf's check_python_headers().
|
||||||
|
|
||||||
|
See: https://gitlab.com/ita1024/waf/-/commit/8d6cbb3657bdbf2ad5ef33b8ba51f29747743e1d
|
||||||
|
---
|
||||||
|
wscript | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/wscript b/wscript
|
||||||
|
index 6b53bcd5e..048a3df6d 100644
|
||||||
|
--- a/wscript
|
||||||
|
+++ b/wscript
|
||||||
|
@@ -383,7 +383,7 @@ def my_check_python_headers(conf):
|
||||||
|
if not pybin:
|
||||||
|
conf.fatal('Could not find the python executable')
|
||||||
|
|
||||||
|
- v = 'prefix SO LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS'.split()
|
||||||
|
+ v = 'prefix SO EXT_SUFFIX LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS'.split()
|
||||||
|
try:
|
||||||
|
lst = conf.get_python_variables(["get_config_var('%s') or ''" % x for x in v])
|
||||||
|
except RuntimeError:
|
||||||
|
@@ -397,7 +397,7 @@ def my_check_python_headers(conf):
|
||||||
|
if dct[x]:
|
||||||
|
conf.env[x] = conf.environ[x] = dct[x]
|
||||||
|
|
||||||
|
- env['pyext_PATTERN'] = '%s' + dct['SO'] # not a mistake
|
||||||
|
+ env['pyext_PATTERN'] = '%s' + (dct['EXT_SUFFIX'] or dct['SO']) # SO is deprecated in 3.5 and removed in 3.11
|
||||||
|
|
||||||
|
# Check for python libraries for embedding
|
||||||
|
all_flags = dct['LDFLAGS'] + ' ' + dct['CFLAGS']
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jan 28 09:38:44 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add ba0d8cfcec3d3b0112d1c54991853e6003f2fbf6.patch to resolve
|
||||||
|
python 3.11 build failure
|
||||||
|
- add 0001-pypubsub-Replace-deprecated-inspect.getargspec.patch
|
||||||
|
to fix another python 3.11 build failure
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jan 26 09:14:45 UTC 2023 - pgajdos@suse.com
|
Thu Jan 26 09:14:45 UTC 2023 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -99,10 +99,14 @@ Patch2: 0001-Only-import-attrdict-where-needed.patch
|
|||||||
Patch4: 0003-Make-pip-usage-in-wxget-optional.patch
|
Patch4: 0003-Make-pip-usage-in-wxget-optional.patch
|
||||||
# PATCH-FIX-OPENSUSE
|
# PATCH-FIX-OPENSUSE
|
||||||
Patch5: 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch
|
Patch5: 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch
|
||||||
|
# PATCH-FIX-UPSTREAM - fix python 3.11 support
|
||||||
|
Patch6: https://github.com/wxWidgets/Phoenix/commit/ba0d8cfcec3d3b0112d1c54991853e6003f2fbf6.patch
|
||||||
# PATCH-FIX-OPENSUSE - Test fixes/additions:
|
# PATCH-FIX-OPENSUSE - Test fixes/additions:
|
||||||
Patch112: 0001-Check-HSV-values-in-image-test.patch
|
Patch112: 0001-Check-HSV-values-in-image-test.patch
|
||||||
# PATCH-FIX-UPSTREAM - https://github.com/wxWidgets/Phoenix/pull/2233
|
# PATCH-FIX-UPSTREAM - https://github.com/wxWidgets/Phoenix/pull/2233
|
||||||
Patch113: 0001-Fix-overflow-check-for-wxUIntPtr-type.patch
|
Patch113: 0001-Fix-overflow-check-for-wxUIntPtr-type.patch
|
||||||
|
# PATCH-FIX-UPSTREAM - https://github.com/wxWidgets/Phoenix/pull/2228
|
||||||
|
Patch114: 0001-pypubsub-Replace-deprecated-inspect.getargspec.patch
|
||||||
BuildRequires: %{python_module base}
|
BuildRequires: %{python_module base}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module requests}
|
BuildRequires: %{python_module requests}
|
||||||
|
Loading…
Reference in New Issue
Block a user