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 +++++++- unittests/test_wxdatetime.py | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-) 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/etg/defs.py b/etg/defs.py Index: wxPython-4.2.2/etg/defs.py
index 4445cf93..ceb9e2ef 100644 ===================================================================
--- a/etg/defs.py --- wxPython-4.2.2.orig/etg/defs.py
+++ b/etg/defs.py +++ wxPython-4.2.2/etg/defs.py
@@ -73,7 +73,7 @@ def run(): @@ -73,7 +73,7 @@ def run():
td = module.find('wxUIntPtr') td = module.find('wxUIntPtr')
module.insertItemAfter(td, etgtools.TypedefDef(type='wchar_t', name='wxUChar')) 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='wxInt64', name='time_t'))
+ module.insertItemAfter(td, etgtools.TypedefDef(type='long', 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='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)) 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: wxPython-4.2.2/unittests/test_wxdatetime.py
index 62e7d141..2f620045 100644 ===================================================================
--- a/unittests/test_wxdatetime.py --- wxPython-4.2.2.orig/unittests/test_wxdatetime.py
+++ b/unittests/test_wxdatetime.py +++ wxPython-4.2.2/unittests/test_wxdatetime.py
@@ -25,9 +25,15 @@ class datetime_Tests(wtc.WidgetTestCase): @@ -25,9 +25,15 @@ class datetime_Tests(wtc.WidgetTestCase)
def test_datetime2(self): def test_datetime2(self):
d1 = wx.DateTime.FromHMS(8, 15, 45, 123) d1 = wx.DateTime.FromHMS(8, 15, 45, 123)
d2 = wx.DateTime.FromJDN(12345.67) d2 = wx.DateTime.FromJDN(12345.67)
@ -50,6 +50,3 @@ index 62e7d141..2f620045 100644
def test_datetime3(self): def test_datetime3(self):
d1 = wx.DateTime.Today() d1 = wx.DateTime.Today()
d2 = wx.DateTime.Now() 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> <multibuild>
<package>python3</package>
<package>python39</package>
<package>python310</package> <package>python310</package>
<package>python311</package> <package>python311</package>
<package>python312</package> <package>python312</package>
<package>python313</package>
</multibuild> </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> Mon Jan 15 16:29:26 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
@ -262,60 +349,60 @@ Tue Apr 28 09:01:51 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Update to 4.1.0: - Update to 4.1.0:
* Add a sample for wx.Font.AddPrivateFont to the demo. * Add a sample for wx.Font.AddPrivateFont to the demo.
* Added wrappers for the OSXEnableAutomaticQuoteSubstitution, * Added wrappers for the OSXEnableAutomaticQuoteSubstitution,
OSXEnableAutomaticDashSubstitution, and OSXDisableAllSmartSubstitutions OSXEnableAutomaticDashSubstitution, and OSXDisableAllSmartSubstitutions
methods in wx.TextCtrl. Also added OSXEnableAutomaticTabbing in wx.App. methods in wx.TextCtrl. Also added OSXEnableAutomaticTabbing in wx.App.
* Added wx.ColourDialogEvent, wx.DCTextBgColourChanger, wx.DCTextBgModeChanger, * Added wx.ColourDialogEvent, wx.DCTextBgColourChanger, wx.DCTextBgModeChanger,
wx.grid.GridCellDateRenderer, wx.grid.GridCellDateEditor, wx.SystemAppearance, etc. wx.grid.GridCellDateRenderer, wx.grid.GridCellDateEditor, wx.SystemAppearance, etc.
* Many of the deprecated items in wxWidgets and wxPython are being or have * Many of the deprecated items in wxWidgets and wxPython are being or have
been removed. Be sure to test your code in a recent 4.0.x release with been removed. Be sure to test your code in a recent 4.0.x release with
warnings enabled so you can see which class, method or function calls warnings enabled so you can see which class, method or function calls
you need to change. you need to change.
* Bug fixes in wx.lib.calendar: key navigation across month boundaries is * Bug fixes in wx.lib.calendar: key navigation across month boundaries is
now possible; key navigation now sets the date and fires the EVT_CALENDAR event; now possible; key navigation now sets the date and fires the EVT_CALENDAR event;
setter APIs now set the date correctly #1230. setter APIs now set the date correctly #1230.
* Switch to using a wx.Overlay in the Widget Inspection Tool to highlight * Switch to using a wx.Overlay in the Widget Inspection Tool to highlight
widgets when running on a GTK3 port. widgets when running on a GTK3 port.
* Fixed issue in wx.lib.agw.customtreectrl where the label editor could * Fixed issue in wx.lib.agw.customtreectrl where the label editor could
remain stuck forever #1235. remain stuck forever #1235.
* Grafted on a EnableSystemTheme method to the classes which support it. * Grafted on a EnableSystemTheme method to the classes which support it.
This can be used to disable the default system theme on Windows for native This can be used to disable the default system theme on Windows for native
widgets like wx.ListCtrl, wx.TreeCtrl and wx.dataview.DataViewCtrl. widgets like wx.ListCtrl, wx.TreeCtrl and wx.dataview.DataViewCtrl.
It has no effect on the other platforms. It has no effect on the other platforms.
* The wx.WS_EX_VALIDATE_RECURSIVELY extended style flag is obsolete, * The wx.WS_EX_VALIDATE_RECURSIVELY extended style flag is obsolete,
as it is now the default (and only) behavior. The style flag has been added as it is now the default (and only) behavior. The style flag has been added
back into wxPython for compatibility, but with a zero value. You can just back into wxPython for compatibility, but with a zero value. You can just
stop using it in your code with no change in behavior. #1278 stop using it in your code with no change in behavior. #1278
* Fix a sometimes crash when using a wx.Overlay by letting the wx.DCOverlay * Fix a sometimes crash when using a wx.Overlay by letting the wx.DCOverlay
hold a reference to the DC, to ensure that the DCOverlay is destroyed first. PR#1301 hold a reference to the DC, to ensure that the DCOverlay is destroyed first. PR#1301
* Replaced the Vagrant VMs used for building wxPython for various Linux distros * Replaced the Vagrant VMs used for building wxPython for various Linux distros
with Docker images. with Docker images.
* Add some missing methods in wx.adv.BitmapComboBox #1307 * Add some missing methods in wx.adv.BitmapComboBox #1307
* Added the wx.svg package which contains code for parsing SVG * Added the wx.svg package which contains code for parsing SVG
(Scalable Vector Graphics) files, and also code for integrating with (Scalable Vector Graphics) files, and also code for integrating with
wxPython. It can rasterize the SVG to a wx.Bitmap of any size with no wxPython. It can rasterize the SVG to a wx.Bitmap of any size with no
loss of quality, and it can also render the SVG directly to a loss of quality, and it can also render the SVG directly to a
wx.GraphicsContext using the GC's drawing primitives. PR#1323 wx.GraphicsContext using the GC's drawing primitives. PR#1323
* Ported the embedding sample from Classic, which shows how to use wxPython * Ported the embedding sample from Classic, which shows how to use wxPython
from a C++ wxWidgets application that embeds Python. PR#1353 from a C++ wxWidgets application that embeds Python. PR#1353
* Fixed wx.GetApp() to use wxWidgets' global wxApp instance instead of * Fixed wx.GetApp() to use wxWidgets' global wxApp instance instead of
maintaining its own pointer. This way, if the wxApp is created by C++ maintaining its own pointer. This way, if the wxApp is created by C++
code wxPython will still be able to get access to it. #1126 code wxPython will still be able to get access to it. #1126
* Added wrappers for the wx.ActivityIndicator class. * Added wrappers for the wx.ActivityIndicator class.
* Added wrappers for the wx.CollapsibleHeaderCtrl class. * Added wrappers for the wx.CollapsibleHeaderCtrl class.
* Fixed issues in PlotCanvas around displaying and using scrollbars. #1428 * Fixed issues in PlotCanvas around displaying and using scrollbars. #1428
* Added wx.msw.CHMHelpController, and also a wx.HelpController factory function * Added wx.msw.CHMHelpController, and also a wx.HelpController factory function
that creates an instance of the best Help Controller for the platform. #1536 that creates an instance of the best Help Controller for the platform. #1536
* Added wx.adv.GenericAnimationCtrl so the generic version of the animation * Added wx.adv.GenericAnimationCtrl so the generic version of the animation
classes can be used even on the platforms that have a native version. classes can be used even on the platforms that have a native version.
Note that due to internal changes to support both types of animations, Note that due to internal changes to support both types of animations,
some API changes in how the Animation objects are created. See the some API changes in how the Animation objects are created. See the
AnimationCtrl.py sample in the demo for the various usage patterns #1579 AnimationCtrl.py sample in the demo for the various usage patterns #1579
* Added wrappers for the wx.grid.GridBlockCoords, wx.grid.GridBlocks, and * Added wrappers for the wx.grid.GridBlockCoords, wx.grid.GridBlocks, and
wx.grid.GridBlockDiffResult classes, as well as associated new methods wx.grid.GridBlockDiffResult classes, as well as associated new methods
in the wx.grid.Grid class. These provide a new way to interact with blocks in the wx.grid.Grid class. These provide a new way to interact with blocks
of selected cells, including an iterator interface in wx.grid.GridBlocks of selected cells, including an iterator interface in wx.grid.GridBlocks
which should be a more efficient (time and memory) way to process large which should be a more efficient (time and memory) way to process large
groups of selections. groups of selections.
- Disable Python2 - Disable Python2
@ -488,7 +575,7 @@ Thu Feb 7 18:42:42 UTC 2019 - Todd R <toddrme2178@gmail.com>
The object returned by wx.NewIdRef will automatically convert to an int when The object returned by wx.NewIdRef will automatically convert to an int when
passing it to a window constructor, and can also be used as the source in a passing it to a window constructor, and can also be used as the source in a
Bind(). (#896) Bind(). (#896)
* Fixed issue when sys.prefix is not unicode (Python2) and when its contents * Fixed issue when sys.prefix is not unicode (Python2) and when its contents
are not translatable to utf-8. are not translatable to utf-8.
- Update to 4.0.2 - Update to 4.0.2
* Fixed wx.html2.EVT_WEBVIEW_NAVIGATING event not being sent on some versions * Fixed wx.html2.EVT_WEBVIEW_NAVIGATING event not being sent on some versions
@ -580,7 +667,7 @@ Wed Jun 13 03:42:38 UTC 2018 - toddrme2178@gmail.com
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jun 4 09:11:22 UTC 2018 - petr@cervinka.net Mon Jun 4 09:11:22 UTC 2018 - petr@cervinka.net
- Move "wx/*.so" libraries to main package, remove devel package (boo#1095747) - Move "wx/*.so" libraries to main package, remove devel package (boo#1095747)
- Add rpmlintrc file to filter devel-file-in-non-devel-package - Add rpmlintrc file to filter devel-file-in-non-devel-package
- Apply spec-cleaner - Apply spec-cleaner

View File

@ -1,5 +1,5 @@
# #
# spec file # spec file for package python-wxPython
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
@ -19,9 +19,8 @@
%define X_display ":98" %define X_display ":98"
%bcond_without test %bcond_without test
%bcond_without syswx %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) # - 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 %bcond_without rebuild_sip
%if %{with syswx} %if %{with syswx}
@ -45,9 +44,6 @@ ExclusiveArch: donotbuild
# Extraneous build_flavors and skips are excluded automatically so future # Extraneous build_flavors and skips are excluded automatically so future
# additions can be included here early and old flavors can be removed some time # additions can be included here early and old flavors can be removed some time
# after the global drop in Factory. # after the global drop in Factory.
%if "%flavor" != "python39"
%define skip_python39 1
%endif
%if "%flavor" != "python310" %if "%flavor" != "python310"
%define skip_python310 1 %define skip_python310 1
%endif %endif
@ -57,22 +53,18 @@ ExclusiveArch: donotbuild
%if "%flavor" != "python312" %if "%flavor" != "python312"
%define skip_python312 1 %define skip_python312 1
%endif %endif
%if "%flavor" != "python313"
%define skip_python313 1
%endif
%else %else
# SLE/Leap # SLE/Leap
%if "%flavor" == "python3"
# python3 is the old 3.6
%define pythons python3
%define python3_provides %{nil}
%else
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
%if "%flavor" != "%pythons" %if "%flavor" != "%pythons"
# sle15_python_module_pythons defines the flavor, otherwise don't build # sle15_python_module_pythons defines the flavor, otherwise don't build
%define pythons %{nil} %define pythons %{nil}
%endif %endif
%endif %endif
%endif %if "%{shrink:%pythons}" == ""
# The obs server-side interpreter cannot use lua or rpm shrink
%if "%pythons" == "" || "%pythons" == " " || "%pythons" == " " || "%pythons" == " " || "%pythons" == " "
ExclusiveArch: donotbuild ExclusiveArch: donotbuild
%define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version} %define python_module() %flavor-not-enabled-in-buildset-for-suse-%{?suse_version}
%else %else
@ -86,7 +78,7 @@ ExclusiveArch: donotbuild
%endif %endif
Name: %{pprefix}-wxPython Name: %{pprefix}-wxPython
Version: 4.2.1 Version: 4.2.2
Release: 0 Release: 0
Summary: The "Phoenix" variant of the wxWidgets Python bindings Summary: The "Phoenix" variant of the wxWidgets Python bindings
License: GPL-2.0-or-later License: GPL-2.0-or-later
@ -96,24 +88,18 @@ URL: https://github.com/wxWidgets/Phoenix
Source0: wxPython-%{version}.tar.gz Source0: wxPython-%{version}.tar.gz
Source1: python-wxPython-rpmlintrc Source1: python-wxPython-rpmlintrc
Source2: repack 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 # PATCH-FIX-OPENSUSE
Patch12: use_stl_build.patch 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 # PATCH-FIX-OPENSUSE
Patch14: 0004-Fix-time_t-ETG-typedef-extend-DateTime.FromTimeT-tes.patch 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: # 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-OPENSUSE - Numpy for Python 3.12 is a thing Patch114: wxwidgets-3.2.5.patch
Patch113: require-numpy.patch
# TODO: Replace deprecated setup.py calls in build.py with PEP517 without building wxWidgets into the wheel # 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 devel}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: c++_compiler BuildRequires: c++_compiler
@ -121,7 +107,7 @@ BuildRequires: fdupes
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
%if %{with syswx} %if %{with syswx}
BuildRequires: %{python_module sip6-devel >= 6.5.1} BuildRequires: %{python_module sip6-devel >= 6.8.3}
BuildRequires: waf BuildRequires: waf
BuildRequires: wxGTK3-devel >= 3.2.0 BuildRequires: wxGTK3-devel >= 3.2.0
BuildRequires: wxWidgets-3_2-doc-xml >= 3.2.0 BuildRequires: wxWidgets-3_2-doc-xml >= 3.2.0
@ -145,9 +131,8 @@ BuildRequires: pkgconfig(xtst)
%endif %endif
Requires: %{pprefix}-Pillow Requires: %{pprefix}-Pillow
Requires: %{pprefix}-numpy Requires: %{pprefix}-numpy
Requires: %{pprefix}-six
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun): update-alternatives
Conflicts: %{pprefix}-wxWidgets Conflicts: %{pprefix}-wxWidgets
Provides: %{pprefix}-wxWidgets = %{version} Provides: %{pprefix}-wxWidgets = %{version}
%if "%{python_provides}" != "" %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