[Bug 379573] [NEW] sudo update-alternatives does not configure the default python-wxgtk in Jaunty
Launchpad Bug Tracker
379573 at bugs.launchpad.net
Wed Jul 21 14:21:08 BST 2010
You have been subscribed to a public bug by Devid Antonio Filoni (d.filoni):
In Jaunty, when both python-wxgtk2.6 and python-wxgtk2.8 are installed, this happens by default:
>>> import wx
>>> wx.VERSION
(2, 6, 3, 2, '')
In Intrepid, this happens by default:
>>> import wx
>>> wx.VERSION
(2, 8, 8, 0, '')
This switch might be unexpected by programs which run fine under
intrepid and depend on 2.8. (In the ideal scenario they should choose
the right version with wxversion.)
Moreover in Jaunty 2.8 seems to be configured as the default:
$ ls /etc/alternatives | grep wx
wx2.5.pth
wx2.6.pth
$ sudo update-alternatives --config wx2.6.pth
[sudo] password for stani:
Er zijn 2 alternatieven die 'wx2.6.pth' voorzien.
Selectie Alternatieven
-----------------------------------------------
*+ 1 /usr/lib/wx/python/wx2.8.pth
2 /usr/lib/wx/python/wx2.6.pth
So with "update-alternatives" I can't select that "import wx", imports
wxPython 2.8
In Debian this looks right:
$ sudo update-alternatives --config wx.pth
There are 2 choices for the alternative wx.pth (providing /usr/lib/wx/python/wx.pth).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/wx/python/wx2.6.pth 26 auto mode
1 /usr/lib/wx/python/wx2.6.pth 26 manual mode
2 /usr/lib/wx/python/wx2.8.pth 25 manual mode
When 2 is selected, wx 2.8 will be the default version (in Debian):
>>> import sys, wx
>>> print wx.VERSION
(2, 8, 7, 1, '')
>>> print sys.path
['', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gst-0.10', '/usr/lib/pymodules/python2.5', '/usr/lib/pymodules/python2.5/gtk-2.0', '/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode']
In Jaunty if I look to wx.pth:
$ cat /usr/lib/python2.6/dist-packages/wx.pth
wx-2.8-gtk2-unicode
In Jaunty many wx*.pth are added in comparison to Intrepid (but this is probably irrelevant):
$ locate .pth | grep wx
/etc/alternatives/wx2.5.pth
/etc/alternatives/wx2.6.pth
/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode.pth
/usr/lib/python2.5/site-packages/wx.pth
/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx.pth
/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode.pth
/usr/lib/python2.6/dist-packages/wx.pth
/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx.pth
/usr/lib/wx/python/wx2.8.pth
/usr/share/pyshared/wx-2.8-gtk2-unicode.pth
/usr/share/pyshared/wx-2.8-gtk2-unicode/wx.pth
/var/lib/dpkg/alternatives/wx2.5.pth
/var/lib/dpkg/alternatives/wx2.6.pth
In Intrepid this gives:
$ locate .pth | grep wx
/etc/alternatives/wx2.4.pth
/etc/alternatives/wx2.5.pth
/usr/lib/python2.4/site-packages/wx.pth
/usr/lib/python2.5/site-packages/wx.pth
/usr/lib/wx/python/wx2.6.pth
/usr/lib/wx/python/wx2.8.pth
/var/lib/dpkg/alternatives/wx2.4.pth
/var/lib/dpkg/alternatives/wx2.5.pth
In Jaunty:
>>> import sys
>>> sys.path
['', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', '/usr/lib/python2.6/dist-packages/Numeric', '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/python2.6/dist-packages/gst-0.10', '/var/lib/python-support/python2.6', '/usr/lib/python2.6/dist-packages/gtk-2.0', '/var/lib/python-support/python2.6/gtk-2.0', '/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode', '/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode']
In Intrepid:
>>> import sys
>>> sys.path
['', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gst-0.10', '/var/lib/python-support/python2.5', '/var/lib/python-support/python2.5/gtk-2.0', '/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode']
So in Jaunty both wx-2.6 and wx2.8 are added to the sys.path, while in Intrepid only wx-2.8 was present.
To me it seems like a bug that both wx 2.6 and 2.8 are in sys.path
See also this discussion on the wxpython users mailing list upstream:
http://thread.gmane.org/gmane.comp.python.wxpython/70340
Some wxpython programs are now showing bugs as they are not compatible
anymore with wxpython2.6
If possible, it would be nice that in Jaunty (like in intrepid) wxPython
2.8 is the default if both 2.6 and 2.8 are installed. For sure sudo
update-alternatives should work for wxpython, so that at least the user
can configure it the default wxpython version.
** Affects: wxwidgets2.6 (Ubuntu)
Importance: Undecided
Status: Fix Released
** Affects: wxwidgets2.8 (Ubuntu)
Importance: Undecided
Assignee: Morten Kjeldgaard (mok0)
Status: Fix Released
** Affects: wxwidgets2.6 (Ubuntu Lucid)
Importance: Undecided
Status: Confirmed
** Affects: wxwidgets2.8 (Ubuntu Lucid)
Importance: Undecided
Status: Confirmed
--
sudo update-alternatives does not configure the default python-wxgtk in Jaunty
https://bugs.edge.launchpad.net/bugs/379573
You received this bug notification because you are a member of Ubuntu Package Archive Administrators, which is a direct subscriber.
More information about the ubuntu-archive
mailing list