Control: tags 761413 + patch
Control: severity -1 serious
# Justification: blocks the on-going wxpython3.0 transition

I've attached a patch which updates vtk6 to work with wxPython 3.0.  It
uses named parameters so should maintain compatibility with wxPython
2.8 too.  The upstream changes are identical to those already applied
to the vtk package.

This fixes the test script in this bug to work correctly.

If you'd like me to NMU, I have the build I've just done and would be
happy to sign and upload it.

Cheers,
    Olly
diff -Nru vtk6-6.1.0+dfsg/debian/changelog vtk6-6.1.0+dfsg/debian/changelog
--- vtk6-6.1.0+dfsg/debian/changelog	2014-06-21 19:14:02.000000000 +1200
+++ vtk6-6.1.0+dfsg/debian/changelog	2014-09-20 08:46:07.000000000 +1200
@@ -1,3 +1,11 @@
+vtk6 (6.1.0+dfsg-8.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Update for wxPython 3.0 (Closes: #761413):
+    - New patch: wxpython3.0.patch
+
+ -- Olly Betts <o...@survex.com>  Fri, 19 Sep 2014 20:45:58 +0000
+
 vtk6 (6.1.0+dfsg-8) unstable; urgency=medium
 
   * [f813911] Add libxdmf-dev to Depends of libvtk6-dev.
diff -Nru vtk6-6.1.0+dfsg/debian/patches/series vtk6-6.1.0+dfsg/debian/patches/series
--- vtk6-6.1.0+dfsg/debian/patches/series	2014-06-13 09:38:20.000000000 +1200
+++ vtk6-6.1.0+dfsg/debian/patches/series	2014-09-14 15:07:38.000000000 +1200
@@ -13,3 +13,4 @@
 
 # Temporarly disable system_alglib
 # use_system_alglib.patch
+wxpython3.0.patch
diff -Nru vtk6-6.1.0+dfsg/debian/patches/wxpython3.0.patch vtk6-6.1.0+dfsg/debian/patches/wxpython3.0.patch
--- vtk6-6.1.0+dfsg/debian/patches/wxpython3.0.patch	1970-01-01 12:00:00.000000000 +1200
+++ vtk6-6.1.0+dfsg/debian/patches/wxpython3.0.patch	2014-09-14 15:07:29.000000000 +1200
@@ -0,0 +1,79 @@
+Description: Update for wxPython 3.0
+ These changes should remain compatible with wxPython 2.8.
+Bug-Debian: https://bugs.debian.org/761414
+Forwarded: no
+Last-Update: 2014-09-13
+
+--- vtk-5.10.1.orig/Wrapping/Python/vtk/wx/wxVTKRenderWindow.py
++++ vtk-5.10.1/Wrapping/Python/vtk/wx/wxVTKRenderWindow.py
+@@ -19,7 +19,7 @@ Creation:
+ 
+ wxVTKRenderWindow(parent, ID, stereo=0, [wx keywords]):
+ 
+-You should create a wx.PySimpleApp() or some other wx**App
++You should create a wx.App(False) or some other wx.App subclass
+ before creating the window.
+ 
+ ----------------------------------------
+@@ -190,10 +190,12 @@ class wxVTKRenderWindow(baseClass):
+         # initialize the wx.Window
+         if baseClass.__name__ == 'GLCanvas':
+             # Set the doublebuffer attribute of the GL canvas.
+-            baseClass.__init__(self, parent, ID, position, size, style,
++            baseClass.__init__(self, parent, ID, pos=position, size=size,
++                               style=style,
+                                attribList=[wx.glcanvas.WX_GL_DOUBLEBUFFER])
+         else:
+-            baseClass.__init__(self, parent, ID, position, size, style)
++            baseClass.__init__(self, parent, ID, pos=position, size=size,
++                               style=style)
+ 
+         # create the RenderWindow and initialize it
+         self._RenderWindow = vtk.vtkRenderWindow()
+@@ -735,7 +737,7 @@ def wxVTKRenderWindowConeExample():
+     """Like it says, just a simple example.
+     """
+     # every wx app needs an app
+-    app = wx.PySimpleApp()
++    app = wx.App(False)
+ 
+     # create the widget
+     frame = wx.Frame(None, -1, "wxVTKRenderWindow", size=(400,400))
+--- vtk-5.10.1.orig/Wrapping/Python/vtk/wx/wxVTKRenderWindowInteractor.py
++++ vtk-5.10.1/Wrapping/Python/vtk/wx/wxVTKRenderWindowInteractor.py
+@@ -21,8 +21,8 @@ Creation:
+ 
+  wxVTKRenderWindowInteractor(parent, ID, stereo=0, [wx keywords]):
+ 
+- You should create a wx.PySimpleApp() or some other wx**App before
+- creating the window.
++ You should create a wx.App(False) or some other wx.App subclass
++ before creating the window.
+ 
+ Behaviour:
+ 
+@@ -171,11 +171,12 @@ class wxVTKRenderWindowInteractor(baseCl
+                 attribList.append(wx.glcanvas.WX_GL_STEREO)
+ 
+             try:
+-                baseClass.__init__(self, parent, ID, position, size, style,
+-                                   attribList=attribList)
++                baseClass.__init__(self, parent, ID, pos=position, size=size,
++                                   style=style, attribList=attribList)
+             except wx.PyAssertionError:
+                 # visual couldn't be allocated, so we go back to default
+-                baseClass.__init__(self, parent, ID, position, size, style)
++                baseClass.__init__(self, parent, ID, pos=position, size=size,
++                                   style=style)
+                 if stereo:
+                     # and make sure everyone knows that the stereo
+                     # visual wasn't set.
+@@ -666,7 +667,7 @@ def wxVTKRenderWindowInteractorConeExamp
+     """Like it says, just a simple example
+     """
+     # every wx app needs an app
+-    app = wx.PySimpleApp()
++    app = wx.App(False)
+ 
+     # create the top-level frame, sizer and wxVTKRWI
+     frame = wx.Frame(None, -1, "wxVTKRenderWindowInteractor", size=(400,400))

Reply via email to