Sync from SUSE:SLFO:Main python-wxPython revision d5968983c0a5b00e864227f7a43e8b3e

This commit is contained in:
Adrian Schröter 2024-12-04 09:25:04 +01:00
parent 965590bb23
commit bbd67cfe55
14 changed files with 239 additions and 315 deletions

View File

@ -1,33 +0,0 @@
From 371101db7a010d679d214fde617dae9de02008d9 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Fri, 14 Jul 2023 13:23:03 -0400
Subject: [PATCH] Handle wxGLCanvas::CreateSurface which is only available on
EGL
---
etg/_glcanvas.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/etg/_glcanvas.py b/etg/_glcanvas.py
index 52992ed8..2e578645 100644
--- a/etg/_glcanvas.py
+++ b/etg/_glcanvas.py
@@ -125,6 +125,15 @@ def run():
sipRes = wxGLCanvas::IsDisplaySupported(attribPtr);
""")
+ c.find('CreateSurface').setCppCode("""\
+ #if wxUSE_GLCANVAS_EGL
+ return self->CreateSurface();
+ #else
+ wxPyRaiseNotImplemented();
+ return false;
+ #endif
+ """)
+
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)
--
2.43.0

View File

@ -1,48 +0,0 @@
From 6a049ccc0ad96f25c3f7d8540b218ffe8921d8c5 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Tue, 5 Dec 2023 23:42:21 -0500
Subject: [PATCH] Support building with Doxygen 1.9.7
Doxygen 1.9.7 made some changes whereby some method definitions are now
defined in separate XML files, with a "refid" that links to them. In
order to support this, we need to follow these "refids" to pick up the
method definition from the separate group XML files.
---
etgtools/extractors.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/etgtools/extractors.py b/etgtools/extractors.py
index 8c992cb14..5ae1361f9 100644
--- a/etgtools/extractors.py
+++ b/etgtools/extractors.py
@@ -62,6 +62,8 @@ def extract(self, element):
# class. Should be overridden in derived classes to get what each one
# needs in addition to the base.
self.name = element.find(self.nameTag).text
+ if self.name is None:
+ self.name = ''
if '::' in self.name:
loc = self.name.rfind('::')
self.name = self.name[loc+2:]
@@ -1574,12 +1576,21 @@ def addElement(self, element):
extractingMsg(kind, element)
for node in element.findall('sectiondef/memberdef'):
self.addElement(node)
+ for node in element.findall('sectiondef/member'):
+ node = self.resolveRefid(node)
+ self.addElement(node)
else:
raise ExtractorError('Unknown module item kind: %s' % kind)
return item
+ def resolveRefid(self, node):
+ from etgtools import XMLSRC
+ refid = node.get('refid')
+ fname = os.path.join(XMLSRC, refid.rsplit('_', 1)[0]) + '.xml'
+ root = et.parse(fname).getroot()
+ return root.find(".//memberdef[@id='{}']".format(refid))
def addCppFunction(self, type, name, argsString, body, doc=None, **kw):

View File

@ -1,73 +0,0 @@
From 7a198b8cae9a81cec4d25a0c6c5cc65ad8822bb2 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Mon, 20 Nov 2023 22:12:58 -0500
Subject: [PATCH] Update wxTextCtrl OSX overrides since they're now documented
---
etg/textctrl.py | 48 +++++++++++++++++++++---------------------------
1 file changed, 21 insertions(+), 27 deletions(-)
diff --git a/etg/textctrl.py b/etg/textctrl.py
index af631a53..690d68c4 100644
--- a/etg/textctrl.py
+++ b/etg/textctrl.py
@@ -114,35 +114,29 @@ def parseAndTweakModule():
# OSX methods for controlling native features
- c.addCppMethod('void', 'OSXEnableAutomaticQuoteSubstitution', '(bool enable)',
- doc="Mac-only method for turning on/off automatic quote substitutions.",
- body="""\
- #ifdef __WXMAC__
- self->OSXEnableAutomaticQuoteSubstitution(enable);
- #else
- wxPyRaiseNotImplemented();
- #endif
- """)
+ c.find('OSXEnableAutomaticQuoteSubstitution').setCppCode("""\
+ #ifdef __WXMAC__
+ self->OSXEnableAutomaticQuoteSubstitution(enable);
+ #else
+ wxPyRaiseNotImplemented();
+ #endif
+ """)
- c.addCppMethod('void', 'OSXEnableAutomaticDashSubstitution', '(bool enable)',
- doc="Mac-only method for turning on/off automatic dash substitutions.",
- body="""\
- #ifdef __WXMAC__
- self->OSXEnableAutomaticDashSubstitution(enable);
- #else
- wxPyRaiseNotImplemented();
- #endif
- """)
+ c.find('OSXEnableAutomaticDashSubstitution').setCppCode("""\
+ #ifdef __WXMAC__
+ self->OSXEnableAutomaticDashSubstitution(enable);
+ #else
+ wxPyRaiseNotImplemented();
+ #endif
+ """)
- c.addCppMethod('void', 'OSXDisableAllSmartSubstitutions', '()',
- doc="Mac-only method to disable all automatic text substitutions.",
- body="""\
- #ifdef __WXMAC__
- self->OSXDisableAllSmartSubstitutions();
- #else
- wxPyRaiseNotImplemented();
- #endif
- """)
+ c.find('OSXDisableAllSmartSubstitutions').setCppCode("""\
+ #ifdef __WXMAC__
+ self->OSXDisableAllSmartSubstitutions();
+ #else
+ wxPyRaiseNotImplemented();
+ #endif
+ """)
# TODO: add support for wxTextProofOptions (only supported on MSW/GTK3)
# so will need stubs on other platforms.
--
2.43.0

View File

@ -1,25 +0,0 @@
From 3b042c863f4092f802a877a972fd6eb284451a78 Mon Sep 17 00:00:00 2001
From: Ben Greiner <code@bnavigator.de>
Date: Sat, 6 Jan 2024 21:58:29 +0100
Subject: [PATCH] integer division for randint
Python 3.12 does not accept floats for random.randint() anymore
---
unittests/test_dcDrawLists.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/unittests/test_dcDrawLists.py b/unittests/test_dcDrawLists.py
index 9e35e5eaf..6696a79a0 100644
--- a/unittests/test_dcDrawLists.py
+++ b/unittests/test_dcDrawLists.py
@@ -63,8 +63,8 @@ def makeRandomRectangles():
rects = []
for i in range(num):
- W = random.randint(10, w/2)
- H = random.randint(10, h/2)
+ W = random.randint(10, w//2)
+ H = random.randint(10, h//2)
x = random.randint(0, w - W)
y = random.randint(0, h - H)
rects.append( (x, y, W, H) )

View File

@ -1,49 +0,0 @@
From 00ba66a86f65abb24402427d66bf50e8da477321 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Tue, 28 Jun 2022 18:16:34 +0200
Subject: [PATCH 3/4] Make pip usage in wxget optional
As the code states, using pip to download is abusing it, and as it is
just a fallback in case neither wget nor urllib works.
---
wx/tools/wxget.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/wx/tools/wxget.py b/wx/tools/wxget.py
index c83ced7a..75eb0f47 100644
--- a/wx/tools/wxget.py
+++ b/wx/tools/wxget.py
@@ -33,7 +33,6 @@ import os
import wx
import subprocess
import ssl
-import pip
if sys.version_info >= (3,):
from urllib.error import (HTTPError, URLError)
@@ -44,6 +43,11 @@ else:
from urllib2 import (HTTPError, URLError)
import urlparse
+try:
+ import pip
+except ImportError as e:
+ pip = None
+
def get_docs_demo_url(demo=False):
""" Get the URL for the docs or demo."""
if demo:
@@ -196,8 +200,8 @@ def download_file(url, dest=None, force=False, trusted=False):
success = download_wget(url, filename, trusted) # Try wget
if not success:
success = download_urllib(url, filename) # Try urllib
- if not success:
- success = download_pip(url, filename, force, trusted) # Try urllib
+ if not success and pip not None:
+ success = download_pip(url, filename, force, trusted) # Try pip
if not success:
split_url = url.split('/')
msg = '\n'.join([
--
2.36.1

View File

@ -16,10 +16,10 @@ C standard, it could even be a double).
unittests/test_wxdatetime.py | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/etg/defs.py b/etg/defs.py
index 4445cf93..ceb9e2ef 100644
--- a/etg/defs.py
+++ b/etg/defs.py
Index: wxPython-4.2.2/etg/defs.py
===================================================================
--- wxPython-4.2.2.orig/etg/defs.py
+++ wxPython-4.2.2/etg/defs.py
@@ -73,7 +73,7 @@ def run():
td = module.find('wxUIntPtr')
module.insertItemAfter(td, etgtools.TypedefDef(type='wchar_t', name='wxUChar'))
@ -27,13 +27,13 @@ index 4445cf93..ceb9e2ef 100644
- module.insertItemAfter(td, etgtools.TypedefDef(type='wxInt64', name='time_t'))
+ module.insertItemAfter(td, etgtools.TypedefDef(type='long', name='time_t'))
module.insertItemAfter(td, etgtools.TypedefDef(type='long long', name='wxFileOffset'))
module.insertItemAfter(td, etgtools.TypedefDef(type='SIP_SSIZE_T', name='ssize_t'))
module.insertItemAfter(td, etgtools.TypedefDef(type='Py_ssize_t', name='ssize_t'))
module.insertItemAfter(td, etgtools.TypedefDef(type='unsigned char', name='byte', pyInt=True))
diff --git a/unittests/test_wxdatetime.py b/unittests/test_wxdatetime.py
index 62e7d141..2f620045 100644
--- a/unittests/test_wxdatetime.py
+++ b/unittests/test_wxdatetime.py
@@ -25,9 +25,15 @@ class datetime_Tests(wtc.WidgetTestCase):
Index: wxPython-4.2.2/unittests/test_wxdatetime.py
===================================================================
--- wxPython-4.2.2.orig/unittests/test_wxdatetime.py
+++ wxPython-4.2.2/unittests/test_wxdatetime.py
@@ -25,9 +25,15 @@ class datetime_Tests(wtc.WidgetTestCase)
def test_datetime2(self):
d1 = wx.DateTime.FromHMS(8, 15, 45, 123)
d2 = wx.DateTime.FromJDN(12345.67)
@ -50,6 +50,3 @@ index 62e7d141..2f620045 100644
def test_datetime3(self):
d1 = wx.DateTime.Today()
d2 = wx.DateTime.Now()
--
2.36.1

View File

@ -0,0 +1,59 @@
---
ext/wxWidgets/src/expat/expat/lib/expat.h | 4 +++-
ext/wxWidgets/src/expat/expat/lib/xmlparse.c | 11 ++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
--- a/ext/wxWidgets/src/expat/expat/lib/expat.h
+++ b/ext/wxWidgets/src/expat/expat/lib/expat.h
@@ -127,7 +127,9 @@ enum XML_Error {
/* Added in 2.3.0. */
XML_ERROR_NO_BUFFER,
/* Added in 2.4.0. */
- XML_ERROR_AMPLIFICATION_LIMIT_BREACH
+ XML_ERROR_AMPLIFICATION_LIMIT_BREACH,
+ /* Added in 2.6.4. */
+ XML_ERROR_NOT_STARTED,
};
enum XML_Content_Type {
--- a/ext/wxWidgets/src/expat/expat/lib/xmlparse.c
+++ b/ext/wxWidgets/src/expat/expat/lib/xmlparse.c
@@ -2207,6 +2207,9 @@ XML_StopParser(XML_Parser parser, XML_Bo
if (parser == NULL)
return XML_STATUS_ERROR;
switch (parser->m_parsingStatus.parsing) {
+ case XML_INITIALIZED:
+ parser->m_errorCode = XML_ERROR_NOT_STARTED;
+ return XML_STATUS_ERROR;
case XML_SUSPENDED:
if (resumable) {
parser->m_errorCode = XML_ERROR_SUSPENDED;
@@ -2217,7 +2220,7 @@ XML_StopParser(XML_Parser parser, XML_Bo
case XML_FINISHED:
parser->m_errorCode = XML_ERROR_FINISHED;
return XML_STATUS_ERROR;
- default:
+ case XML_PARSING:
if (resumable) {
#ifdef XML_DTD
if (parser->m_isParamEntity) {
@@ -2228,6 +2231,9 @@ XML_StopParser(XML_Parser parser, XML_Bo
parser->m_parsingStatus.parsing = XML_SUSPENDED;
} else
parser->m_parsingStatus.parsing = XML_FINISHED;
+ break;
+ default:
+ assert(0);
}
return XML_STATUS_OK;
}
@@ -2493,6 +2499,9 @@ XML_ErrorString(enum XML_Error code) {
return XML_L(
"limit on input amplification factor (from DTD and entities) breached");
}
+ /* Added in 2.6.4. */
+ case XML_ERROR_NOT_STARTED:
+ return XML_L("parser not started");
return NULL;
}

View File

@ -1,7 +1,6 @@
<multibuild>
<package>python3</package>
<package>python39</package>
<package>python310</package>
<package>python311</package>
<package>python312</package>
<package>python313</package>
</multibuild>

View File

@ -1,3 +1,90 @@
-------------------------------------------------------------------
Sun Nov 17 13:31:39 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Disable python3 (=3.6) flavor for 15.X
* Upstream only supports Python 3.7+
* Requires sip 6.8 which only supports Python 3.8+
-------------------------------------------------------------------
Thu Nov 7 17:09:23 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add CVE-2024-50602-no-crash-XML_ResumeParser.patch fixing a
crash in the vendored libexpats XML_ResumeParser function
(bsc#1232590, CVE-2024-50602).
-------------------------------------------------------------------
Fri Oct 4 11:02:43 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 4.2.2:
+ Fix some Python 3.12 compatibility issues (segfault on exit) by upgrading sip & waf
+ Fix more float/int conversion issues in wx.lib classes
+ Add initialValue argument to wx.lib.DirBrowseButton
+ Fix wxImage.Clear()
+ Fix blurry text in AuiNotebook tab
+ Add support for frozen rows and columns to GridWithLabelRenderersMixin
+ demo: ShortcutEditor: Fix broken call GetMenuBar()
+ Add proper support for DataViewCheckIconTextRenderer
+ Build: Use new tarfile.extractall() filter for safer tarfile extraction
+ Fix typo in wx.lib.agw.persist_handlers
+ Fix 'str' to 'wxString' converstation, when emoji is inside string
+ Use unwrap before isbuiltin check
+ Preserve pane icons when loading a perspective in agw.aui
+ wx.agw.aui: don't uninitialize the AuiManager if the window close event is vetoed
+ Pure python AUI: Make behavior in all platforms more equal
+ wx.agw.aui. Do layout as the last step after all pane infos have recomputed their best sizes
+ Fix additional SyntaxWarnings with Python 3.12
+ Fix wx.lib.agw.ribbon.RibbonButtonBar DeleteButton function
+ UltimateListCtrl: Add support for ULC_AUTO_CHECK_PARENT
+ Remove dependency on distutils
+ Improve wx.lib.agw.FlatMenu memory usage
+ Support NumPy 2.0
+ Fix EditLabel on CustomTreeCtrl doesn't automatically select the entire text
+ Fix Widgets placed in the UltimateListControl are drawn in the wrong location
+ Fix wx.lib.agw.aui sometimes shows "ghost" docking guide
+ Fix Thumbnailctrl SetSelection raises exception if it tries to scroll
- Add python-six BuildRequires: needed for the test suite.
- Drop upstream merged patches:
+ 0001-Update-wxTextCtrl-OSX-overrides-since-they-re-now-do.patch
+ 0001-Handle-wxGLCanvas-CreateSurface-which-is-only-availa.patch
+ 0001-Support-building-with-Doxygen-1.9.7.patch
+ 0001-wxWidgets-Phoenix-integer-division.patch
+ 0003-Make-pip-usage-in-wxget-optional.patch
+ require-numpy.patch
+ drop-py2.patch
+ Phoenix-pr2580+2591+2592-numpy2.patch
-------------------------------------------------------------------
Thu Aug 29 13:57:46 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Add Phoenix-pr2580+2591+2592-numpy2.patch
* gh#wxWidgets/Phoenix#2580
* gh#wxWidgets/Phoenix#2591
- Update multibuild
* Finalize preparation for python313
* Drop obsolete python39
-------------------------------------------------------------------
Sun Jun 30 20:55:59 UTC 2024 - Dirk Müller <dmueller@suse.com>
- prepare for python 3.13
-------------------------------------------------------------------
Thu May 30 13:08:43 UTC 2024 - Markéta Machová <mmachova@suse.com>
- Add drop-py2.patch to get rid of the six dependency (it will die
with Python 3.13)
-------------------------------------------------------------------
Sat May 25 09:16:36 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Add wxwidgets-3.2.5.patch to resolve wxPython FTBFS
-------------------------------------------------------------------
Fri Feb 23 12:16:15 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use newly supported shrink{} on OBS to exclude python flavors
when all python versions are skipped.
-------------------------------------------------------------------
Mon Jan 15 16:29:26 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -1,5 +1,5 @@
#
# spec file
# spec file for package python-wxPython
#
# Copyright (c) 2024 SUSE LLC
#
@ -19,9 +19,8 @@
%define X_display ":98"
%bcond_without test
%bcond_without syswx
# We rebuild the ETG and SIP files for two reasons:
# We rebuild the ETG and SIP files for:
# - Fixing a bug in the ETG time_t typedef (see patch)
# - Compatibility with SIP 6.5.x, for Leap 15.x
%bcond_without rebuild_sip
%if %{with syswx}
@ -45,9 +44,6 @@ ExclusiveArch: donotbuild
# Extraneous build_flavors and skips are excluded automatically so future
# additions can be included here early and old flavors can be removed some time
# after the global drop in Factory.
%if "%flavor" != "python39"
%define skip_python39 1
%endif
%if "%flavor" != "python310"
%define skip_python310 1
%endif
@ -57,22 +53,18 @@ ExclusiveArch: donotbuild
%if "%flavor" != "python312"
%define skip_python312 1
%endif
%if "%flavor" != "python313"
%define skip_python313 1
%endif
%else
# SLE/Leap
%if "%flavor" == "python3"
# python3 is the old 3.6
%define pythons python3
%define python3_provides %{nil}
%else
%{?sle15_python_module_pythons}
%if "%flavor" != "%pythons"
# sle15_python_module_pythons defines the flavor, otherwise don't build
%define pythons %{nil}
%endif
%endif
%endif
# The obs server-side interpreter cannot use lua or rpm shrink
%if "%pythons" == "" || "%pythons" == " " || "%pythons" == " " || "%pythons" == " " || "%pythons" == " "
%if "%{shrink:%pythons}" == ""
ExclusiveArch: donotbuild
%define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version}
%else
@ -86,7 +78,7 @@ ExclusiveArch: donotbuild
%endif
Name: %{pprefix}-wxPython
Version: 4.2.1
Version: 4.2.2
Release: 0
Summary: The "Phoenix" variant of the wxWidgets Python bindings
License: GPL-2.0-or-later
@ -96,24 +88,18 @@ URL: https://github.com/wxWidgets/Phoenix
Source0: wxPython-%{version}.tar.gz
Source1: python-wxPython-rpmlintrc
Source2: repack
Patch1: 0001-Update-wxTextCtrl-OSX-overrides-since-they-re-now-do.patch
Patch2: 0001-Handle-wxGLCanvas-CreateSurface-which-is-only-availa.patch
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2497
Patch3: 0001-Support-building-with-Doxygen-1.9.7.patch
# PATCH-FIX-UPSTREAM https://github.com/wxWidgets/Phoenix/pull/2508
Patch4: 0001-wxWidgets-Phoenix-integer-division.patch
# PATCH-FIX-OPENSUSE
Patch12: use_stl_build.patch
# PATCH-FIX-UPSTREAM - https://github.com/wxWidgets/Phoenix/pull/2232
Patch13: 0003-Make-pip-usage-in-wxget-optional.patch
# PATCH-FIX-OPENSUSE
Patch14: 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch
# PATCH-FIX-UPSTREAM CVE-2024-50602-no-crash-XML_ResumeParser.patch bsc#1232590 mcepl@suse.com
# prevent crashing of vendored libexpat in XML_ResumeParser
Patch15: CVE-2024-50602-no-crash-XML_ResumeParser.patch
# PATCH-FIX-OPENSUSE - Test fixes/additions:
Patch112: 0001-Check-HSV-values-in-image-test.patch
# PATCH-FIX-OPENSUSE - Numpy for Python 3.12 is a thing
Patch113: require-numpy.patch
Patch114: wxwidgets-3.2.5.patch
# TODO: Replace deprecated setup.py calls in build.py with PEP517 without building wxWidgets into the wheel
BuildRequires: %{python_module base}
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: c++_compiler
@ -121,7 +107,7 @@ BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
%if %{with syswx}
BuildRequires: %{python_module sip6-devel >= 6.5.1}
BuildRequires: %{python_module sip6-devel >= 6.8.3}
BuildRequires: waf
BuildRequires: wxGTK3-devel >= 3.2.0
BuildRequires: wxWidgets-3_2-doc-xml >= 3.2.0
@ -145,9 +131,8 @@ BuildRequires: pkgconfig(xtst)
%endif
Requires: %{pprefix}-Pillow
Requires: %{pprefix}-numpy
Requires: %{pprefix}-six
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
Conflicts: %{pprefix}-wxWidgets
Provides: %{pprefix}-wxWidgets = %{version}
%if "%{python_provides}" != ""

View File

@ -1,11 +0,0 @@
Revert https://github.com/wxWidgets/Phoenix/commit/b1c55639dfb73db3a11307c9de888540cec512df
--- a/requirements/install.txt 2023-06-07 01:31:16.000000000 +0000
+++ b/requirements/install.txt 2024-01-06 22:08:26.485981672 +0000
@@ -1,5 +1,4 @@
# Runtime dependencies needed when using wxPython Phoenix
-numpy < 1.17 ; python_version <= '2.7'
-numpy ; python_version >= '3.0' and python_version < '3.12'
+numpy
pillow
six

BIN
wxPython-4.2.1.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
wxPython-4.2.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

36
wxwidgets-3.2.5.patch Normal file
View File

@ -0,0 +1,36 @@
Do not fail the wxPython build when using a wxWidgets-3.2.5 base.
Generated by:
git diff 5622abb73deaa26dc2f6dc4cd8b4b2050396b49a..78938da1218483024b3a7acf55b5fb5513882916 etg/
---
etg/window.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
--- a/etg/window.py
+++ b/etg/window.py
@@ -268,6 +268,23 @@ def run():
return NULL;
#endif
""")
+ c.find('GetOrCreateAccessible').setCppCode("""\
+ #if wxUSE_ACCESSIBILITY
+ return self->GetOrCreateAccessible();
+ #else
+ wxPyRaiseNotImplemented();
+ return NULL;
+ #endif
+ """)
+ c.find('CreateAccessible').factory = True
+ c.find('CreateAccessible').setCppCode("""\
+ #if wxUSE_ACCESSIBILITY
+ return self->CreateAccessible();
+ #else
+ wxPyRaiseNotImplemented();
+ return NULL;
+ #endif
+ """)
c.find('SetAccessible.accessible').transfer = True
c.find('SetAccessible').setCppCode("""\
#if wxUSE_ACCESSIBILITY