|
 |
5804b9a |
From 3f9dc246ae660318d1e8b03fa7c410dfdc2a520e Mon Sep 17 00:00:00 2001
|
|
 |
5804b9a |
From: Scott Talbert <swt@techie.net>
|
|
 |
5804b9a |
Date: Sat, 20 Jan 2018 17:05:11 -0500
|
|
 |
5804b9a |
Subject: [PATCH] Unbundle sip
|
|
 |
5804b9a |
|
|
 |
5804b9a |
---
|
|
 |
5804b9a |
etg/dataview.py | 4 ++--
|
|
 |
5804b9a |
etg/grid.py | 4 ++--
|
|
 |
5804b9a |
etg/sizer.py | 4 ++--
|
|
 |
5804b9a |
etg/window.py | 4 ++--
|
|
 |
5804b9a |
wscript | 20 +-------------------
|
|
 |
5804b9a |
wx/lib/gizmos/dynamicsash.py | 6 +++---
|
|
 |
5804b9a |
6 files changed, 12 insertions(+), 30 deletions(-)
|
|
 |
5804b9a |
|
|
 |
5804b9a |
diff --git a/etg/dataview.py b/etg/dataview.py
|
|
 |
5804b9a |
index c0be8351..0a877a3f 100644
|
|
 |
5804b9a |
--- a/etg/dataview.py
|
|
 |
5804b9a |
+++ b/etg/dataview.py
|
|
 |
5804b9a |
@@ -374,8 +374,8 @@ def run():
|
|
 |
5804b9a |
is reference counted so it can be shared with other views.
|
|
 |
5804b9a |
""",
|
|
 |
5804b9a |
body="""\
|
|
 |
5804b9a |
- import wx.siplib
|
|
 |
5804b9a |
- wasPyOwned = wx.siplib.ispyowned(model)
|
|
 |
5804b9a |
+ import sip
|
|
 |
5804b9a |
+ wasPyOwned = sip.ispyowned(model)
|
|
 |
5804b9a |
self._AssociateModel(model)
|
|
 |
5804b9a |
# Ownership of the python object has just been transferred to
|
|
 |
5804b9a |
# C++, so DecRef the C++ instance associated with this python
|
|
 |
5804b9a |
diff --git a/etg/grid.py b/etg/grid.py
|
|
 |
5804b9a |
index 47c1e0ce..097e9c86 100644
|
|
 |
5804b9a |
--- a/etg/grid.py
|
|
 |
5804b9a |
+++ b/etg/grid.py
|
|
 |
5804b9a |
@@ -445,8 +445,8 @@ def run():
|
|
 |
5804b9a |
body="""\
|
|
 |
5804b9a |
val = self._SetTable(table, takeOwnership, selmode)
|
|
 |
5804b9a |
if takeOwnership:
|
|
 |
5804b9a |
- import wx.siplib
|
|
 |
5804b9a |
- wx.siplib.transferto(table, self)
|
|
 |
5804b9a |
+ import sip
|
|
 |
5804b9a |
+ sip.transferto(table, self)
|
|
 |
5804b9a |
return val
|
|
 |
5804b9a |
""")
|
|
 |
5804b9a |
|
|
 |
5804b9a |
diff --git a/etg/sizer.py b/etg/sizer.py
|
|
 |
5804b9a |
index a5533eab..1335987f 100644
|
|
 |
5804b9a |
--- a/etg/sizer.py
|
|
 |
5804b9a |
+++ b/etg/sizer.py
|
|
 |
5804b9a |
@@ -148,8 +148,8 @@ def run():
|
|
 |
5804b9a |
" if theSizer:\n"
|
|
 |
5804b9a |
" doSomething()",
|
|
 |
5804b9a |
body="""\
|
|
 |
5804b9a |
- import wx.siplib
|
|
 |
5804b9a |
- return not wx.siplib.isdeleted(self)
|
|
 |
5804b9a |
+ import sip
|
|
 |
5804b9a |
+ return not sip.isdeleted(self)
|
|
 |
5804b9a |
""")
|
|
 |
5804b9a |
c.addPyCode('Sizer.__bool__ = Sizer.__nonzero__') # For Python 3
|
|
 |
5804b9a |
|
|
 |
5804b9a |
diff --git a/etg/window.py b/etg/window.py
|
|
 |
5804b9a |
index be481ae6..a1bb0f7e 100644
|
|
 |
5804b9a |
--- a/etg/window.py
|
|
 |
5804b9a |
+++ b/etg/window.py
|
|
 |
5804b9a |
@@ -178,8 +178,8 @@ def run():
|
|
 |
5804b9a |
" if theWindow:\n"
|
|
 |
5804b9a |
" doSomething()",
|
|
 |
5804b9a |
body="""\
|
|
 |
5804b9a |
- import wx.siplib
|
|
 |
5804b9a |
- return not wx.siplib.isdeleted(self)
|
|
 |
5804b9a |
+ import sip
|
|
 |
5804b9a |
+ return not sip.isdeleted(self)
|
|
 |
5804b9a |
""")
|
|
 |
5804b9a |
c.addPyCode('Window.__bool__ = Window.__nonzero__') # For Python 3
|
|
 |
5804b9a |
|
|
 |
5804b9a |
diff --git a/wscript b/wscript
|
|
 |
5804b9a |
index d051ebbc..9a3c26da 100644
|
|
 |
5804b9a |
--- a/wscript
|
|
 |
5804b9a |
+++ b/wscript
|
|
 |
5804b9a |
@@ -96,7 +96,7 @@ def configure(conf):
|
|
 |
5804b9a |
conf.env.msvc_relwithdebug = conf.options.msvc_relwithdebug
|
|
 |
5804b9a |
|
|
 |
5804b9a |
# Ensure that the headers in siplib and Phoenix's src dir can be found
|
|
 |
5804b9a |
- conf.env.INCLUDES_WXPY = ['sip/siplib', 'src']
|
|
 |
5804b9a |
+ conf.env.INCLUDES_WXPY = ['src']
|
|
 |
5804b9a |
|
|
 |
5804b9a |
if isWindows:
|
|
 |
5804b9a |
# Windows/MSVC specific stuff
|
|
 |
5804b9a |
@@ -506,24 +506,6 @@ def build(bld):
|
|
 |
5804b9a |
|
|
 |
5804b9a |
|
|
 |
5804b9a |
# Create the build tasks for each of our extension modules.
|
|
 |
5804b9a |
- addRelwithdebugFlags(bld, 'siplib')
|
|
 |
5804b9a |
- siplib = bld(
|
|
 |
5804b9a |
- features = 'c cxx cshlib cxxshlib pyext',
|
|
 |
5804b9a |
- target = makeTargetName(bld, 'siplib'),
|
|
 |
5804b9a |
- source = ['sip/siplib/apiversions.c',
|
|
 |
5804b9a |
- 'sip/siplib/array.c',
|
|
 |
5804b9a |
- 'sip/siplib/bool.cpp',
|
|
 |
5804b9a |
- 'sip/siplib/descriptors.c',
|
|
 |
5804b9a |
- 'sip/siplib/int_convertors.c',
|
|
 |
5804b9a |
- 'sip/siplib/objmap.c',
|
|
 |
5804b9a |
- 'sip/siplib/qtlib.c',
|
|
 |
5804b9a |
- 'sip/siplib/siplib.c',
|
|
 |
5804b9a |
- 'sip/siplib/threads.c',
|
|
 |
5804b9a |
- 'sip/siplib/voidptr.c',
|
|
 |
5804b9a |
- ],
|
|
 |
5804b9a |
- uselib = 'siplib WX WXPY',
|
|
 |
5804b9a |
- )
|
|
 |
5804b9a |
- makeExtCopyRule(bld, 'siplib')
|
|
 |
5804b9a |
|
|
 |
5804b9a |
# Add build rules for each of our ETG generated extension modules
|
|
 |
5804b9a |
makeETGRule(bld, 'etg/_core.py', '_core', 'WX')
|
|
 |
5804b9a |
diff --git a/wx/lib/gizmos/dynamicsash.py b/wx/lib/gizmos/dynamicsash.py
|
|
 |
5804b9a |
index 03b2aebf..142129de 100644
|
|
 |
5804b9a |
--- a/wx/lib/gizmos/dynamicsash.py
|
|
 |
5804b9a |
+++ b/wx/lib/gizmos/dynamicsash.py
|
|
 |
5804b9a |
@@ -16,7 +16,7 @@ reunified through the user interface.
|
|
 |
5804b9a |
"""
|
|
 |
5804b9a |
|
|
 |
5804b9a |
import wx
|
|
 |
5804b9a |
-import wx.siplib
|
|
 |
5804b9a |
+import sip
|
|
 |
5804b9a |
|
|
 |
5804b9a |
#----------------------------------------------------------------------------
|
|
 |
5804b9a |
# Styles
|
|
 |
5804b9a |
@@ -945,7 +945,7 @@ class _DynamicSashWindowLeaf(wx.EvtHandler):
|
|
 |
5804b9a |
# we'll just save the object's address instead, and then use that to
|
|
 |
5804b9a |
# fetch the real proxy object when it's needed later.
|
|
 |
5804b9a |
self.m_child = None
|
|
 |
5804b9a |
- self.m_child_ptr = wx.siplib.unwrapinstance(window)
|
|
 |
5804b9a |
+ self.m_child_ptr = sip.unwrapinstance(window)
|
|
 |
5804b9a |
|
|
 |
5804b9a |
# Delay the reparenting until after the AddChild has finished.
|
|
 |
5804b9a |
event = _DynamicSashReparentEvent(self)
|
|
 |
5804b9a |
@@ -954,7 +954,7 @@ class _DynamicSashWindowLeaf(wx.EvtHandler):
|
|
 |
5804b9a |
|
|
 |
5804b9a |
def _checkPendingChild(self):
|
|
 |
5804b9a |
if hasattr(self, 'm_child_ptr'):
|
|
 |
5804b9a |
- self.m_child = wx.siplib.wrapinstance(self.m_child_ptr, wx.Object)
|
|
 |
5804b9a |
+ self.m_child = sip.wrapinstance(self.m_child_ptr, wx.Object)
|
|
 |
5804b9a |
del self.m_child_ptr
|
|
 |
5804b9a |
|
|
 |
5804b9a |
|
|
 |
5804b9a |
--
|
|
 |
5804b9a |
2.14.3
|
|
 |
5804b9a |
|