Control: tags 759079 + patch
Here's a patch to fix the dependencies of pyhoca-gui on wxPython, and to
make a few code updates for better wxPython 3.0 compatibility.
I wasn't easily able to see how to actually configure the app, so I've
not done a lot of testing, but the upstream code was preferring wxPython
2.9 over wxPython 2.8, so it's likely to work well with 3.0 (2.9 was the
development series which lead to 3.0).
Let me know if you'd like me to NMU these changes.
Cheers,
Olly
diff -Nru pyhoca-gui-0.4.0.9/debian/changelog pyhoca-gui-0.4.0.9/debian/changelog
--- pyhoca-gui-0.4.0.9/debian/changelog 2014-08-07 04:17:15.000000000 +1200
+++ pyhoca-gui-0.4.0.9/debian/changelog 2014-08-24 15:19:24.000000000 +1200
@@ -1,3 +1,12 @@
+pyhoca-gui (0.4.0.9-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * debian/control: Actually depend on the wxPython module - python-wxgtk3.0
+ instead of wx-common and python-wxtools.
+ * New patch wxpy3.0-compat.patch (Closes: #759079)
+
+ -- Olly Betts <[email protected]> Sun, 24 Aug 2014 15:16:59 +1200
+
pyhoca-gui (0.4.0.9-1) unstable; urgency=medium
* New upstream release.
diff -Nru pyhoca-gui-0.4.0.9/debian/control pyhoca-gui-0.4.0.9/debian/control
--- pyhoca-gui-0.4.0.9/debian/control 2014-08-07 04:16:35.000000000 +1200
+++ pyhoca-gui-0.4.0.9/debian/control 2014-08-24 15:16:50.000000000 +1200
@@ -27,8 +27,7 @@
python-argparse,
python-notify,
python-setproctitle,
- wx-common (>=2.8.10.0),
- python-wxtools (>=2.8.10.0),
+ python-wxgtk3.0,
gnome-colors-common,
Recommends:
mate-notification-daemon | notification-daemon,
diff -Nru pyhoca-gui-0.4.0.9/debian/patches/series pyhoca-gui-0.4.0.9/debian/patches/series
--- pyhoca-gui-0.4.0.9/debian/patches/series 1970-01-01 12:00:00.000000000 +1200
+++ pyhoca-gui-0.4.0.9/debian/patches/series 2014-08-24 15:19:43.000000000 +1200
@@ -0,0 +1 @@
+wxpy3.0-compat.patch
diff -Nru pyhoca-gui-0.4.0.9/debian/patches/wxpy3.0-compat.patch pyhoca-gui-0.4.0.9/debian/patches/wxpy3.0-compat.patch
--- pyhoca-gui-0.4.0.9/debian/patches/wxpy3.0-compat.patch 1970-01-01 12:00:00.000000000 +1200
+++ pyhoca-gui-0.4.0.9/debian/patches/wxpy3.0-compat.patch 2014-08-24 15:25:11.000000000 +1200
@@ -0,0 +1,82 @@
+Description: Fixes for wxPython 3.0
+ Still compatible with wxPython 2.8.
+Author: Olly Betts <[email protected]>
+Bug-Debian: https://bugs.debian.org/759079
+Forwarded: no
+Last-Update: 2014-08-24
+
+--- a/pyhoca/wxgui/frontend.py
++++ b/pyhoca/wxgui/frontend.py
+@@ -22,15 +22,7 @@
+
+ try:
+ import wxversion
+- wxversion.select('2.9')
+- #print 'USING wxPython 2.9'
+-
+-except: pass
+-
+-try:
+- import wxversion
+- wxversion.select('2.8')
+- #print 'USING wxPython 2.8'
++ wxversion.select(['3.0', '2.9', '2.8'])
+
+ except: pass
+
+@@ -43,6 +35,7 @@
+ gevent.monkey.patch_all()
+
+ import wx
++#print 'USING wxPython ', wx.__version__
+
+ import copy
+ import threading
+@@ -64,7 +57,6 @@
+ import serverinfo
+
+ wx.SetDefaultPyEncoding("utf-8")
+-wx.InitAllImageHandlers()
+
+ #def SetExitHandler(func):
+ # """\
+--- a/pyhoca/wxgui/printingprefs.py
++++ b/pyhoca/wxgui/printingprefs.py
+@@ -406,7 +406,7 @@
+ wildcard = "All files (*.*)|*"
+ dlg = wx.FileDialog(
+ self, message=_(u"Choose PDF viewer application"), defaultDir=_LOCAL_HOME,
+- defaultFile="", wildcard=wildcard, style=wx.OPEN | wx.CHANGE_DIR )
++ defaultFile="", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_CHANGE_DIR )
+ # Show the dialog and retrieve the user response. If it is the OK response,
+ # process the data.
+ if dlg.ShowModal() == wx.ID_OK:
+--- a/pyhoca/wxgui/profilemanager.py
++++ b/pyhoca/wxgui/profilemanager.py
+@@ -1459,7 +1459,7 @@
+ u"All files (*.*)|*")
+ dlg = wx.FileDialog(
+ self, message=_(u"Choose an icon for this session profile"), defaultDir=iconsdir,
+- defaultFile="", wildcard=wildcard, style=wx.OPEN | wx.CHANGE_DIR )
++ defaultFile="", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_CHANGE_DIR )
+ # Show the dialog and retrieve the user response. If it is the OK response,
+ # process the data.
+ if dlg.ShowModal() == wx.ID_OK:
+@@ -1904,7 +1904,7 @@
+ wildcard = _(u"All files (*.*)|*")
+ dlg = wx.FileDialog(
+ self, message=_(u"Choose a public SSH key"), defaultDir=sshdir,
+- defaultFile="", wildcard=wildcard, style=wx.OPEN | wx.CHANGE_DIR )
++ defaultFile="", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_CHANGE_DIR )
+ # Show the dialog and retrieve the user response. If it is the OK response,
+ # process the data.
+ if dlg.ShowModal() == wx.ID_OK:
+@@ -1928,7 +1928,7 @@
+ wildcard = "All files (*.*)|*"
+ dlg = wx.FileDialog(
+ self, message=_(u"Choose a public SSH key"), defaultDir=sshdir,
+- defaultFile="", wildcard=wildcard, style=wx.OPEN | wx.CHANGE_DIR )
++ defaultFile="", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_CHANGE_DIR )
+ # Show the dialog and retrieve the user response. If it is the OK response,
+ # process the data.
+ if dlg.ShowModal() == wx.ID_OK: