Opened 15 years ago

Closed 13 years ago

#23768 closed enhancement (fixed)

gramps: add python25 and python26 variants, move spell checking to spell variant, add graphviz variant, add dependencies

Reported by: lkraider (Paul Eipper) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: haspatch Cc: ryandesign (Ryan Carsten Schmidt), guy.linton@…
Port: gramps

Description

This patch adds python2.6 support to building Gramps.

Also gramps sould depend on libsoup, since otherwise it builds its own version, which may trigger bug #23467 .

Attachments (1)

gramps_python26.patch (1.5 KB) - added by lkraider (Paul Eipper) 15 years ago.

Download all attachments as: .zip

Change History (17)

Changed 15 years ago by lkraider (Paul Eipper)

Attachment: gramps_python26.patch added

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Keywords: haspatch added
Owner: changed from macports-tickets@… to rjt-gramps@…

comment:2 Changed 15 years ago by lkraider (Paul Eipper)

just noting it fixes #23766 (libsoup dep) if applied

PS: forgot to add the maitainer again, sorry

comment:3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Owner: changed from rjt-gramps@… to macports-tickets@…
Summary: gramps python2.6gramps: add python25 and python26 variants, move spell checking to spell variant, add graphviz variant, add dependencies

Using python26 is a good idea. For now I've switched gramps to unconditionally use python26 in r65611. Or is there a compelling reason why someone would still want the option of using python25?

I don't think we need to break spell checking support out into a variant.

The libsoup issue is filed as #23766. More info is requested there.

I see you also added a dependency on librsvg. What's that used for?

You also added a variant for graphviz. I suppose we could add that. It doesn't do a lot of course; gramps will be able to use graphviz at runtime if it's there, and won't if it's not. Or does gramps check for graphviz at build time? I didn't see any output indicating it did.

comment:4 Changed 15 years ago by lkraider (Paul Eipper)

Personally I don't have any problems on it depending on python26 only, but it should be pointed out that Gramps works with python25, so others might find it useful to have that option.

I broke spelling into a variant since I don't need English spelling correction for a family tree app and also prefer to keep dependencies to a minimum, but sure, it's not really required.

Good question about librsvg. I added it because their HowTo page lists it as a dependency, I didn't really check the source though: http://www.gramps-project.org/wiki/index.php?title=Installation#Installing_GRAMPS_from_source_code

Graphviz is also listed there. I'm not sure it's a build dependency, even so, I prefer to have explicit dependencies also for runtime ones, since then I can know what a program is able to use feature-wise which I would otherwise never find out.

comment:5 Changed 15 years ago by lkraider (Paul Eipper)

Note: graphviz port is depends_run only

comment:6 Changed 15 years ago by lkraider (Paul Eipper)

I just dropped py26-gnome and gnome-python26-extras dependencies and the build worked fine for Gramps 3.2.0

comment:7 Changed 15 years ago by guy.linton@…

The problem about changing to Python26 is that Gramps should have a dependency on webkit-gtk (in order to make the "Geographic View" available - this is in some sense optional, because the rest of Gramps works without it). 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.

comment:8 Changed 15 years ago by guy.linton@…

Unfortunately, Gramps does not run for me on python 2.6, I get:

4969: ERROR: gramps.py: line 138: Unhandled exception
Traceback (most recent call last):
  File "/opt/local/share/gramps/gui/grampsgui.py", line 317, in __startgramps
    from GrampsLogger import RotateHandler, GtkHandler
  File "/opt/local/share/gramps/GrampsLogger/__init__.py", line 45, in <module>
    from _GtkHandler import GtkHandler
  File "/opt/local/share/gramps/GrampsLogger/_GtkHandler.py", line 4, in <module>
    from _ErrorView import ErrorView
  File "/opt/local/share/gramps/GrampsLogger/_ErrorView.py", line 15, in <module>
    from _ErrorReportAssistant import ErrorReportAssistant
  File "/opt/local/share/gramps/GrampsLogger/_ErrorReportAssistant.py", line 8, in <module>
    import sys, os,bsddb
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/bsddb/__init__.py", line 64, in <module>
    import _bsddb
ImportError: No module named _bsddb

Help please, I have no idea where python expects to find bsddb, nor why it is found in python25. I ran python_select python26, is there anything else I need to do to switch to python 26.

Directory /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/ does not have a _bsddb.so file - is this the problem?

comment:9 Changed 15 years ago by guy.linton@…

I have copied the portfile for 3.2.0 (Version 0 using Python25) Revision 65604 from #24258 into my MacPorts sources tree and rebuilt, and am happy to say that my Gramps now works again.

I think that perhaps bdsdb for python26 is in bsddb185.so instead of _bsddb.so. But in my build, it does not seem to be complete. The last bit of otool -TMvDlL for python25 _bsddb.so says:

Load command 3
          cmd LC_LOAD_DYLIB
      cmdsize 60
         name /opt/local/lib/db46/libdb-4.6.dylib (offset 24)
   time stamp 1269169817 Sun Mar 21 11:10:17 2010
      current version 0.0.0
compatibility version 0.0.0

...skipped

Load command 7
            cmd LC_DYSYMTAB
        cmdsize 80
      ilocalsym 0
      nlocalsym 8010
     iextdefsym 8010
     nextdefsym 5
      iundefsym 8015
      nundefsym 72
         tocoff 0
           ntoc 0
      modtaboff 0
        nmodtab 0
   extrefsymoff 0
    nextrefsyms 0
 indirectsymoff 194972
  nindirectsyms 134
      extreloff 0
        nextrel 0
      locreloff 94208
        nlocrel 465
        /opt/local/lib/db46/libdb-4.6.dylib (compatibility version 0.0.0, current version 0.0.0)
        time stamp 1269169817 Sun Mar 21 11:10:17 2010
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        time stamp 1159409917 Thu Sep 28 03:18:37 2006
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12)
        time stamp 1264792999 Fri Jan 29 19:23:19 2010

but for python26, the last part of the otool output is:

Load command 6
            cmd LC_DYSYMTAB
        cmdsize 80
      ilocalsym 0
      nlocalsym 1104
     iextdefsym 1104
     nextdefsym 1
      iundefsym 1105
      nundefsym 41
         tocoff 0
           ntoc 0
      modtaboff 0
        nmodtab 0
   extrefsymoff 0
    nextrefsyms 0
 indirectsymoff 30680
  nindirectsyms 75
      extreloff 0
        nextrel 0
      locreloff 16384
        nlocrel 68
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        time stamp 1159409917 Thu Sep 28 03:18:37 2006
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12)
        time stamp 1264792999 Fri Jan 29 19:23:19 2010

I have looked for similar issues, and perhaps #15099 is relevant since it seems to relate to where the libraries are, but I don't know how it relates to this problem.

Please let me know what flags for otool are needed if you want the rest of the otool output.

comment:10 in reply to:  7 Changed 15 years ago by mf2k (Frank Schima)

Replying to guy.linton@…:

The problem about changing to Python26 is that Gramps should have a dependency on webkit-gtk (in order to make the "Geographic View" available - this is in some sense optional, because the rest of Gramps works without it). 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 added py26-webkitgtk in r65775.

comment:11 Changed 15 years ago by guy.linton@…

Cc: guy.linton@… added

Cc Me!

comment:12 Changed 15 years ago by guy.linton@…

I have raised #24310 on python26 not providing bsddb.

So my vote would be to revert r65611, at least until #24310 is fixed, but I do appreciate that python26 works for some people.

comment:13 Changed 15 years ago by guy.linton@…

Please see #24310.

I have now rebuilt python26 after installing the updated Xcode 25. Gramps now runs with python26, but I can't open a python26 database with python25 or vice-versa.

In addition, the python26 database is much slower (12 sec for 500 people with python25 and 9 mins 30 secs with python26).

lkraider, are your databases portable between Gramps based on Python25 and Gramps based on Python26, and have you noticed the slow-down? (What OS and architecture are you on, in case that makes a difference).

Hence I am not sure that we can say that python26 works (at least not very well)!

comment:14 Changed 15 years ago by lkraider (Paul Eipper)

@guy.linton:

I didn't have speed issues here, although I have not used Gramps with Python 2.5, but I certainly didn't wait more than 1 min loading a database, even importing from a large GEDCOM one like this for example: http://www.genealogyforum.com/gedcom/gedcom1/ged3.htm

As I said, I didn't test it with Python 2.5, since I use only Python 2.6 on my system, so I don't know about interoperability of the database.

I did have problems generating the ancestry tree, with incomplete redrawing of the graph. It might be some version/compilation setting but I didn't debug it further since I'm not using that feature ATM.

comment:15 Changed 14 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to devans@…

comment:16 Changed 13 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

I believe this ticket is outdated. Latest version of gramps is 3.3.1 as of r84948.

Please test against this latest version and file a new ticket if any issues remain. Thanks.

Note: See TracTickets for help on using tickets.