Dear maintainer,

I've uploaded an NMU for mayavi2 (versioned as 4.3.1-4.1) which
reapplies the lost changes from my earlier NMU 4.3.1-3.1 to update the
package to use wxpython3.0.

Cheers,
    Olly
diff -Nru mayavi2-4.3.1/debian/changelog mayavi2-4.3.1/debian/changelog
--- mayavi2-4.3.1/debian/changelog	2015-05-27 02:08:10.000000000 +1200
+++ mayavi2-4.3.1/debian/changelog	2015-06-05 12:44:58.000000000 +1200
@@ -1,3 +1,12 @@
+mayavi2 (4.3.1-4.1) unstable; urgency=medium
+
+  * Non-maintainer upload, reapplying lost changes from previous NMU
+    4.3.1-3.1 made with maintainer's permission.
+  * Update for wxpython3.0 (Closes: #758939):
+    + New patch: wxpy3.0-compat.patch
+
+ -- Olly Betts <[email protected]>  Fri, 05 Jun 2015 12:44:19 +1200
+
 mayavi2 (4.3.1-4) unstable; urgency=medium
 
   * Add a patch to fix python interpreter (Closes: #785627)
diff -Nru mayavi2-4.3.1/debian/control mayavi2-4.3.1/debian/control
--- mayavi2-4.3.1/debian/control	2014-03-16 17:06:34.000000000 +1300
+++ mayavi2-4.3.1/debian/control	2015-06-05 12:43:05.000000000 +1200
@@ -14,7 +14,7 @@
 Package: mayavi2
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends},
- python-traits, python-traitsui, python-wxgtk2.8, python-numpy,
+ python-traits, python-traitsui, python-wxgtk3.0, python-numpy,
  python-vtk (>= 5.4.2-5), python-pkg-resources, python-envisage,
  python-apptools (>= 4.0.0-1), libjs-jquery, python-configobj
 Suggests: python-scipy, ipython
diff -Nru mayavi2-4.3.1/debian/patches/series mayavi2-4.3.1/debian/patches/series
--- mayavi2-4.3.1/debian/patches/series	2015-05-27 02:05:52.000000000 +1200
+++ mayavi2-4.3.1/debian/patches/series	2015-06-05 12:42:25.000000000 +1200
@@ -1,3 +1,4 @@
 pyinterpreter.diff
 help.diff
 ipython.diff
+wxpy3.0-compat.patch
diff -Nru mayavi2-4.3.1/debian/patches/wxpy3.0-compat.patch mayavi2-4.3.1/debian/patches/wxpy3.0-compat.patch
--- mayavi2-4.3.1/debian/patches/wxpy3.0-compat.patch	1970-01-01 12:00:00.000000000 +1200
+++ mayavi2-4.3.1/debian/patches/wxpy3.0-compat.patch	2015-06-05 12:41:56.000000000 +1200
@@ -0,0 +1,127 @@
+Description: Fixes for wxPython 3.0
+ Retains compatibility with 2.8 - there wx.InitAllImageHandlers() is a no-op,
+ wx.HIDE_READONLY is 0, and wx.PySimpleApp() issues a deprecation warning.
+Author: Olly Betts <[email protected]>
+Bug-Debian: https://bugs.debian.org/758939
+Forwarded: no
+Last-Update: 2014-09-20
+
+Index: mayavi2-4.3.1/tvtk/pyface/ui/wx/init.py
+===================================================================
+--- mayavi2-4.3.1.orig/tvtk/pyface/ui/wx/init.py
++++ mayavi2-4.3.1/tvtk/pyface/ui/wx/init.py
+@@ -22,10 +22,6 @@ if wx.VERSION < (2, 6):
+ _app = wx.GetApp()
+ 
+ if _app is None:
+-    _app = wx.PySimpleApp()
++    _app = wx.App(False)
+-
+-    # Before we can load any images we have to initialize wxPython's image
+-    # handlers.
+-    wx.InitAllImageHandlers()
+ 
+ #### EOF ######################################################################
+Index: mayavi2-4.3.1/tvtk/util/wx_gradient_editor.py
+===================================================================
+--- mayavi2-4.3.1.orig/tvtk/util/wx_gradient_editor.py
++++ mayavi2-4.3.1/tvtk/util/wx_gradient_editor.py
+@@ -392,7 +392,7 @@ class wxGradientEditorWidget(wx.Panel, G
+         (lookuptable) ``*.grad`` (gradient table for use with this program), 
+         and ``*.jpg`` (image of the gradient)
+         """
+-        dlg = wx.FileDialog(self, "Save LUT to...", style=wx.SAVE)
++        dlg = wx.FileDialog(self, "Save LUT to...", style=wx.FD_SAVE)
+         wildcard = "Gradient Files (.grad)|*.grad|"   \
+                    "All files (*.*)|*.*"
+         dlg.SetWildcard(wildcard)
+@@ -405,7 +405,7 @@ class wxGradientEditorWidget(wx.Panel, G
+         """
+         Load a ``*.grad`` lookuptable file using wxpython dialog
+         """
+-        style = wx.OPEN | wx.HIDE_READONLY
++        style = wx.FD_OPEN
+         dlg = wx.FileDialog(self, "Open a file", style=style)
+         wildcard = "Gradient Files (.grad)|*.grad|"   \
+                    "All files (*.*)|*.*"
+@@ -510,7 +510,7 @@ def main():
+         """If we had a vtk window running, update it here"""
+         print("Update Render Window")
+ 
+-    app = wx.PySimpleApp()
++    app = wx.App(False)
+     editor = wxGradientEditor(table,
+                               on_color_table_changed,
+                               colors=['rgb', 'a', 'h', 's', 'v'],
+Index: mayavi2-4.3.1/docs/source/mayavi/auto/wx_embedding.py
+===================================================================
+--- mayavi2-4.3.1.orig/docs/source/mayavi/auto/wx_embedding.py
++++ mayavi2-4.3.1/docs/source/mayavi/auto/wx_embedding.py
+@@ -60,7 +60,7 @@ class MainWindow(wx.Frame):
+                         kind='subpanel').control
+         self.Show(True)
+ 
+-app = wx.PySimpleApp()
++app = wx.App(False)
+ frame = MainWindow(None, wx.ID_ANY)
+ app.MainLoop()
+ 
+Index: mayavi2-4.3.1/docs/source/mayavi/auto/wx_mayavi_embed_in_notebook.py
+===================================================================
+--- mayavi2-4.3.1.orig/docs/source/mayavi/auto/wx_mayavi_embed_in_notebook.py
++++ mayavi2-4.3.1/docs/source/mayavi/auto/wx_mayavi_embed_in_notebook.py
+@@ -80,6 +80,6 @@ class MainWindow(wx.Frame):
+         self.Show(True)
+ 
+ if __name__ == '__main__':
+-    app = wx.PySimpleApp()
++    app = wx.App(False)
+     frame = MainWindow(None, wx.ID_ANY)
+     app.MainLoop()
+Index: mayavi2-4.3.1/examples/mayavi/interactive/wx_embedding.py
+===================================================================
+--- mayavi2-4.3.1.orig/examples/mayavi/interactive/wx_embedding.py
++++ mayavi2-4.3.1/examples/mayavi/interactive/wx_embedding.py
+@@ -60,7 +60,7 @@ class MainWindow(wx.Frame):
+                         kind='subpanel').control
+         self.Show(True)
+ 
+-app = wx.PySimpleApp()
++app = wx.App(False)
+ frame = MainWindow(None, wx.ID_ANY)
+ app.MainLoop()
+ 
+Index: mayavi2-4.3.1/examples/mayavi/interactive/wx_mayavi_embed_in_notebook.py
+===================================================================
+--- mayavi2-4.3.1.orig/examples/mayavi/interactive/wx_mayavi_embed_in_notebook.py
++++ mayavi2-4.3.1/examples/mayavi/interactive/wx_mayavi_embed_in_notebook.py
+@@ -80,6 +80,6 @@ class MainWindow(wx.Frame):
+         self.Show(True)
+ 
+ if __name__ == '__main__':
+-    app = wx.PySimpleApp()
++    app = wx.App(False)
+     frame = MainWindow(None, wx.ID_ANY)
+     app.MainLoop()
+Index: mayavi2-4.3.1/tvtk/pyface/ui/wx/wxVTKRenderWindowInteractor.py
+===================================================================
+--- mayavi2-4.3.1.orig/tvtk/pyface/ui/wx/wxVTKRenderWindowInteractor.py
++++ mayavi2-4.3.1/tvtk/pyface/ui/wx/wxVTKRenderWindowInteractor.py
+@@ -21,7 +21,7 @@ Creation:
+ 
+  wxVTKRenderWindowInteractor(parent, ID, stereo=0, [wx keywords]):
+ 
+- You should create a wx.PySimpleApp() or some other wx**App before
++ You should create a wx.App(False) or some other wx.App subclass before
+  creating the window.
+ 
+ Behaviour:
+@@ -695,7 +695,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