From: Richard T. <rjt...@th...> - 2008-04-12 18:58:48
|
I spoke too soon. The rewritten gtk/glade check does not work either. It looks like imp.find_module is broken on OS X. Maybe we should just stick with the patch to configure. The other option is to add some checking to see if it is running on OS X. What do you think? R. Richard Taylor wrote: > Hi > > Myself and another user are working on the macports Portfile for > gramps-3.0.0 so that it works better on OSX. > > The only modification that we currently have to make is to the > configure.in file. There are two checks that do not work on OSX. > > AC_MSG_CHECKING(Python bindings for gnome) > cat > conftest.py <<EOF > $pygtk_require > try: > import gnome > # Do not import gnome.ui, this can kill python if the > # display cannot be opened. Just search it. > import imp > imp.find_module('gnome/ui') > out("gnome.ui") > except ImportError: > out("NO") > EOF > > > and > > AC_MSG_CHECKING(Python bindings for glade) > cat > conftest.py <<EOF > $pygtk_require > try: > # Do not import gtk.glade, this can raise a RuntimeError if the > # display cannot be opened. Just search it. > import imp > imp.find_module('gtk/glade') > out("gtk.glade") > except ImportError: > out("NO") > EOF > > The first of these (gnome/ui) is a little odd. I have searched the code > and I can not find anything that imports gnome.ui. Is there anything > that does still use this? If not, can this check be removed? The check > fails on OSX but removing it does not appear to cause any runtime > problems in gramps. > > The second test I think is written incorrectly. My reading of the python > reference for the imp module suggests that it should be written: > > AC_MSG_CHECKING(Python bindings for glade) > cat > conftest.py <<EOF > $pygtk_require > try: > # Do not import gtk.glade, this can raise a RuntimeError if the > # display cannot be opened. Just search it. > import imp > imp.find_module('glade',imp.find_module('gtk')[1]) > out("gtk.glade") > except ImportError: > out("NO") > EOF > > > This should work just fine on Linux. > > If these problems could be resolved, gramps will work without > modification on OS X. > > Regards > > Richard > |