I have built Gramps. gtkspell2 was built before gnome-python-extras. When Gramps starts, it tries "import gtkspell", which fails.

Since I am using gtkspell, the python binding should be automatically installed.

The gnome-python-extras README file says:

When you run ./configure, the libraries available on the system
(with respective header files) are automatically detected. If one
module was not enabled while you expected it to be, try looking at
the file config.log; it may provide some useful clues as to why
detection failed.

Clearly detection failed because of the order of building.

I don't know whether this ticket should really be raised against Gramps or gtkspell instead, and I hesitate to even suggest possible approaches, but perhaps under MacPorts all the python modules in gnome-python-extras should be installed by default in case any are needed, or perhaps Gramps should be dependent on a variant of gnome-python-extras which itself is dependent on gtkspell2.

Please note that similar problems are likely to arise for Gramps with other modules in gnome-python-extras, once webkit-gtk builds under MacPorts for me #23464.

Change History (6)

I already switched gramps to use python26 (thus gnome-python26-extras) instead of python25.

I note that gnome-python26-extras declares a dependency on gtkspell2 but gnome-python-extras does not. Should this dependency be added to gnome-python-extras?

Note that there is no capability for ports to depend on a variant of another port; this is ticket #126.

As I mentioned to you in email, I believe spell checking is working for me. If it is not working for you, you should attach here the config.log from your gnome-python26-extras build (meaning, you would have to rebuild gnome-python26-extras and grab the config.log after it's done configuring but before it's done installing) so that we can see what it's failing to find so that we can identify what port(s) we need to add as dependencies.

(1) I suppose the question of whether gnome-python-extras should declare a dependency on gtkspell2 still remains (for other ports if not now for Gramps). I suppose declaring such a dependency is equivalent to always building the gtkspell binding, whether you want it or not (i.e. even if you are using gnome-python-extras for some other module)?

(2) The problem about changing to Python26 is that Gramps should have a dependency on webkit-gtk. I did not include this because webkit-gtk does not build for me. However, once this does build, it will need the python binding, and only py25-webkitgtk is available, there is no corresponding component for python26. I have made this point on ​http://trac.macports.org/ticket/23768.

The question of whether Gramps works or not with python 2.6 is really a separate issue.

To avoid confusion let's keep this ticket as relating only to gnome-python-extras, and hence python 2.5.

In that case, adding a dependency on gtkspell2 as ryandesign suggests should ensure that gnome-python-extras is built after gtkspell2, and hence would resolve the original issue. If you are happy with always building the gtkspell binding, whether you want it or not (i.e. even if you are using gnome-python-extras for some other module) then I suggest that the change be made.