[GRASS-dev] Re: GRASS-dev] grass fails to detect wxpython version

Michael Barton Michael.Barton at asu.edu
Fri Oct 15 03:23:15 EDT 2010


OK. Keep us posted. I'm concerned that wxPython 2.9 is not backward compatible.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice:  480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu











On Oct 14, 2010, at 11:22 PM, Massimo Di Stefano wrote:


I was to mutch optimist :-)

i bypassed the version problem, but obviously from 2.8.x and 2.9.x

there are some api changes ... so the gui doesn't work

i'lll try to work a bit on it to see what can i do.


this the first error i'm having running wxpython gui under wx-2.9 :


GRASS 6.5.svn (<UNKNOWN>):~ > g.gui
Launching 'wxpython' GUI in the background, please wait ...
Traceback (most recent call last):
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1637, in <module>
    sys.exit(main())
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1630, in main
    app = GMApp(workspaceFile)
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1552, in __init__
    wx.App.__init__(self, False)
  File "/usr/local/lib/wxPython-2.9.1.1.b20101001/lib/python2.7/site-packages/wx-2.9.1-osx_cocoa/wx/_core.py", line 8470, in __init__
    self._BootstrapApp()
  File "/usr/local/lib/wxPython-2.9.1.1.b20101001/lib/python2.7/site-packages/wx-2.9.1-osx_cocoa/wx/_core.py", line 8035, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 1573, in OnInit
    workspace = self.workspaceFile)
  File "/Applications/GRASS-6.5.app/Contents/MacOS/etc/wxpython/wxgui.py", line 112, in __init__
    self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
  File "/usr/local/lib/wxPython-2.9.1.1.b20101001/lib/python2.7/site-packages/wx-2.9.1-osx_cocoa/wx/_gdi.py", line 1265, in __init__
    _gdi_.Icon_swiginit(self,_gdi_.new_Icon(*args, **kwargs))
wx._core.PyAssertionError: C++ assertion "err == noErr" failed at /BUILD/wxPython-src-2.9.1.1.b20101001/src/osx/core/bitmap.cpp(590) in GetIconRef(): Error when constructing icon ref





Hi,

sorry, i haven't specified it in the previouse mail,
but i'm already using in my configure instruction :

--with-python=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config \
--with-wxwidgets=/usr/local/lib/wxPython-2.9.1.1.b20101001/bin/wx-config


the problem seems to be in my "version number" and in "globalvar.py" :

GRASS 6.5.svn (<UNKNOWN>):~ > python
Python 2.7 (r27:82500, Jul 17 2010, 23:39:56)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> ver = wx.version().split(' ')[0]
>>> ver
'2.9.1.1.b20101001'
>>> version = [2, 8, 11, 0]
>>> if map(int, ver.split('.')) < version:
...     print 'false'
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: 'b20101001'
>>> ver.split('.')
['2', '9', '1', '1', 'b20101001']
>>> ver.split('.')[-1]
'b20101001'
>>> ver.split('.')[-1:]
['b20101001']
>>> ver.split('.')[:-1]
['2', '9', '1', '1']


i'm looking to hack globalvar to fix the problem,
thanks for any hints.

Ciao,

Massimo.


Il giorno 15/ott/2010, alle ore 05.30, Michael Barton ha scritto:

Because it is a custom Python build, you might need to specify --with-python=/System/Library/Frameworks/Python.framework/Versions/2.9/bin/python2.9-config

(check to make sure this is where the file is and what it is called.)

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu<http://csdc.asu.edu/>











On Oct 14, 2010, at 7:03 PM, <grass-dev-request at lists.osgeo.org<mailto:grass-dev-request at lists.osgeo.org>> wrote:

Message: 8
Date: Fri, 15 Oct 2010 01:43:38 +0200
From: Massimo Di Stefano <massimodisasha at gmail.com<mailto:massimodisasha at gmail.com>>
Subject: [GRASS-dev] grass fails to detect wxpython version
To: grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>
Message-ID: <28CEF25E-7586-419C-AC9E-AF249331B0E2 at gmail.com<mailto:28CEF25E-7586-419C-AC9E-AF249331B0E2 at gmail.com>>
Content-Type: text/plain; charset=us-ascii

Hi All,

for some reason i need to switch to python 2.7 on mac osx
i'm using a custom build python2.7 (i386 + x86_64)
it is my default python version.

epy:~ epy$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python


I'm using a snapshot buld for wx python2.9 (build with cocoa for python2.7)

it is available there :

http://wxpython.wxcommunity.com/preview/20101001/

http://wxpython.wxcommunity.com/preview/20101001/wxPython2.9-osx-2.9.1.1.b20101001-cocoa-py2.7.dmg

tring to run wx-config, i have :

/usr/local/lib/wxPython-2.9.1.1.b20101001/bin/wx-config --version-full
2.9.1.1

i'm building grass6_devel using as wx configure, this line :

--with-wxwidgets=/usr/local/lib/wxPython-2.9.1.1.b20101001/bin/wx-config


the build ends without errors but tring to run grass i have :

GRASS 6.5.svn (<UNKNOWN>):~ > g.gui
Launching 'wxpython' GUI in the background, please wait ...
ERROR: wxGUI requires wxPython >= 2.8.1.1. Requested version of wxPython not found.
GRASS 6.5.svn (<UNKNOWN>):~ >


whay it tel me a version < 2.8 ?

my new wc-config is not in the path .. can be this the reason ? i suppose configure should  handle the path i issued to the wxwidgets options.

have you any clue on what's wrong ?


thanks,

Massimo.

_______________________________________________
grass-dev mailing list
grass-dev at lists.osgeo.org<mailto:grass-dev at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/grass-dev




More information about the grass-dev mailing list