added my Recipes
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
Upstream-Status: Backport [https://github.com/wxWidgets/Phoenix/commit/9986a0d5]
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
|
||||
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.34.1
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From b9f95c06b2e7a525f4f93d705976882e8dcba6ab Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 20 Dec 2022 09:46:31 -0800
|
||||
Subject: [PATCH] sip: Conditionally use GetAssertStackTrace under
|
||||
USE_STACKWALKER
|
||||
|
||||
Musl eg. does not implement stack walker ( backtrace ) therefore it gets
|
||||
disabled for wxwidgets on those systems. This needs to be checked before using
|
||||
GetAssertStackTrace()
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
sip/cpp/sip_corewxAppTraits.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/sip/cpp/sip_corewxAppTraits.cpp b/sip/cpp/sip_corewxAppTraits.cpp
|
||||
index 9c9f9d5b..1d2d2f90 100644
|
||||
--- a/sip/cpp/sip_corewxAppTraits.cpp
|
||||
+++ b/sip/cpp/sip_corewxAppTraits.cpp
|
||||
@@ -471,7 +471,11 @@ static PyObject *meth_wxAppTraits_GetAssertStackTrace(PyObject *sipSelf, PyObjec
|
||||
PyErr_Clear();
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
+#if wxUSE_STACKWALKER
|
||||
sipRes = new ::wxString((sipSelfWasArg ? sipCpp-> ::wxAppTraits::GetAssertStackTrace() : sipCpp->GetAssertStackTrace()));
|
||||
+#else
|
||||
+ sipRes = new ::wxString("");
|
||||
+#endif
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (PyErr_Occurred())
|
||||
@@ -0,0 +1,22 @@
|
||||
Add back default user options for cross build.
|
||||
|
||||
Upstream-Status: Pending [oe specific]
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
---
|
||||
setup.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index a215da7..dccfeb3 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -105,7 +105,7 @@ class wx_build(orig_build):
|
||||
Delegate to build.py for doing the actual build, (including wxWidgets)
|
||||
instead of letting distutils do it all.
|
||||
"""
|
||||
- user_options = [
|
||||
+ user_options = orig_build.user_options + [
|
||||
('skip-build', None, 'skip building the C/C++ code (assumes it has already been done)'),
|
||||
]
|
||||
boolean_options = ['skip-build']
|
||||
@@ -0,0 +1,28 @@
|
||||
Not overwrite CFLAGS and CXXFLAGS. It also avoid buildpaths qa issue:
|
||||
|
||||
WARNING: python3-wxgtk4-4.2.0-r0 do_package_qa: QA Issue: File
|
||||
/usr/lib64/python3.11/site-packages/wx/.debug/_xml.cpython-311-aarch64-linux-gnu.so
|
||||
in package python3-wxgtk4-dbg contains reference to TMPDIR [buildpaths]
|
||||
|
||||
Upstream-Status: Pending [oe specific]
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
---
|
||||
wscript | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/wscript b/wscript
|
||||
index 067b307..50d96d1 100644
|
||||
--- a/wscript
|
||||
+++ b/wscript
|
||||
@@ -195,8 +195,8 @@ def configure(conf):
|
||||
cfg.finishSetup(conf.env.wx_config, conf.env.debug,
|
||||
'mingw32' if isWindows and not conf.env.use_msvc else None)
|
||||
|
||||
- conf.env.CFLAGS = cfg.cflags[:]
|
||||
- conf.env.CXXFLAGS = cfg.cxxflags[:]
|
||||
+ #conf.env.CFLAGS = cfg.cflags[:]
|
||||
+ #conf.env.CXXFLAGS = cfg.cxxflags[:]
|
||||
conf.env.CFLAGS_WX = list()
|
||||
conf.env.CXXFLAGS_WX = list()
|
||||
conf.env.CFLAGS_WXPY = list()
|
||||
@@ -0,0 +1,53 @@
|
||||
Fix issues in build scripts:
|
||||
|
||||
* remove hardcode lib path from buildtools/config.py which is not suitable for
|
||||
cross build
|
||||
* only build target 'build_py' in setup.py
|
||||
* do not override self.install_lib with self.install_platlib which causes
|
||||
package issue when multilib is enabled.
|
||||
|
||||
Upstream-Status: Pending [cross build specific]
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
---
|
||||
buildtools/config.py | 4 ++--
|
||||
setup.py | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/buildtools/config.py b/buildtools/config.py
|
||||
index c837e5d..d426005 100644
|
||||
--- a/buildtools/config.py
|
||||
+++ b/buildtools/config.py
|
||||
@@ -312,8 +312,8 @@ class Configuration(object):
|
||||
# wx-config doesn't output that for some reason. For now, just
|
||||
# add it unconditionally but we should really check if the lib is
|
||||
# really found there or wx-config should be fixed.
|
||||
- if self.WXPORT != 'msw':
|
||||
- self.libdirs.append("/usr/X11R6/lib")
|
||||
+ #if self.WXPORT != 'msw':
|
||||
+ # self.libdirs.append("/usr/X11R6/lib")
|
||||
|
||||
# Move the various -I, -D, etc. flags we got from the config scripts
|
||||
# into the distutils lists.
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 64bec4b..fb29253 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -130,7 +130,7 @@ class wx_build(orig_build):
|
||||
'message and the wxWidgets and Phoenix build steps in the future.\n')
|
||||
|
||||
# Use the same Python that is running this script.
|
||||
- cmd = ['"{}"'.format(sys.executable), '-u', 'build.py', 'build']
|
||||
+ cmd = ['"{}"'.format(sys.executable), '-u', 'build.py', 'build_py']
|
||||
cmd = ' '.join(cmd)
|
||||
runcmd(cmd)
|
||||
|
||||
@@ -233,7 +233,7 @@ if haveWheel:
|
||||
class wx_install(orig_install):
|
||||
def finalize_options(self):
|
||||
orig_install.finalize_options(self)
|
||||
- self.install_lib = self.install_platlib
|
||||
+ #self.install_lib = self.install_platlib
|
||||
|
||||
def run(self):
|
||||
self.run_command("build")
|
||||
@@ -0,0 +1,39 @@
|
||||
DESCRIPTION = "Python3 interface to the wxWidgets Cross-platform C++ GUI toolkit."
|
||||
HOMEPAGE = "http://www.wxpython.org"
|
||||
|
||||
LICENSE = "LGPL-2.0-only & WXwindows"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=bdabf9e11191e2b9d3b6aef5f338ec00"
|
||||
|
||||
DEPENDS = "python3-attrdict3-native python3-six-native wxwidgets-native \
|
||||
wxwidgets \
|
||||
"
|
||||
|
||||
PYPI_PACKAGE = "wxPython"
|
||||
|
||||
SRC_URI += "file://add-back-option-build-base.patch \
|
||||
file://wxgtk-fixup-build-scripts.patch \
|
||||
file://not-overwrite-cflags-cxxflags.patch \
|
||||
file://0001-pypubsub-Replace-deprecated-inspect.getargspec.patch \
|
||||
file://0001-sip-Conditionally-use-GetAssertStackTrace-under-USE_.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "663cebc4509d7e5d113518865fe274f77f95434c5d57bc386ed58d65ceed86c7"
|
||||
|
||||
S = "${WORKDIR}/wxPython-${PV}"
|
||||
|
||||
inherit pypi setuptools3 pkgconfig features_check
|
||||
|
||||
REQUIRED_DISTRO_FEATURES = "x11"
|
||||
|
||||
export WX_CONFIG = "'${RECIPE_SYSROOT_NATIVE}${bindir}/wx-config --prefix=${STAGING_EXECPREFIXDIR} --baselib=${baselib}'"
|
||||
|
||||
RDEPENDS:${PN} = "\
|
||||
python3-difflib \
|
||||
python3-image \
|
||||
python3-numpy \
|
||||
python3-pillow \
|
||||
python3-pip \
|
||||
python3-pprint \
|
||||
python3-pycairo \
|
||||
python3-six \
|
||||
python3-xml \
|
||||
"
|
||||
Reference in New Issue
Block a user