Upgrade to require python 2.5 has been thoroughly discussed before release of 3.0.x series. Please do not change this downstream.

Pointers:
http://www.nabble.com/3.0-and-python-2.5-td13308393.html#a13308393

Rest was on chat I believe. Anyway, the need comes mostly from pygtk too. If I am correct we need recent versions for the mark-up notes, but this was removed for 3.0.x and will only be in 3.1.x. Anyway, if NetBSD changes this, obviously the task is upon you guys to help users that have problems, or to keep patching GRAMPS to make it work with 2.4. GRAMPS development no longer tests with python 2.4

Benny

2008/9/21 Greg Troxel <gdt@ir.bbn.com>

I have not had time lately to really pay attention.  In the NetBSD
pkgsrc package for gramps3, Matthias Drochner just committed a patch to
handle the latest version of py-bsddb3.  I had previously added patches
to use bsddb3 instead of the include and non-working bsddb.  As I see it
there are 4 things wrong in 3.0.1 that perhaps have been fixed for
3.0.2:

 explicit dependency on bsddb3, because python seems to not really
 include bsddb properly any more, so just using that is error prone.

 bsddb3 now uses DB_LOG_AUTO_REMOVE; this API change is unfortunate,
 but it might be best to require a version after the change and just
 use the new API.  pkgsrc has py25-bsddb3-4.7.2 (the 25 just shows
 which python it was built against).

 DB_TXN_NOSYNC seems gone in modern bsddb3

 Don't depend on python 2.5 unless it is really necessary.  The patches
 below make it work with 2.4.  In my view, python 2.4 is not old enough
 to meet the "if you're running it, you are lame for not upgrading, and
 deserve to lose" test (2.2 probably is, 2.3 might be).  I think this
 is the only problem (search below for context):
   -class AllRelReport():
   +class AllRelReport:

Thanks,
Greg


Here is what pkgsrc applies to 3.0.1:

$NetBSD$

--- src/Editors/_EditFamily.py.orig     2008-05-17 16:14:26.000000000 -0400
+++ src/Editors/_EditFamily.py
@@ -25,7 +25,7 @@
 # python modules
 #
 #-------------------------------------------------------------------------
-from bsddb import db as bsddb_db
+from bsddb3 import db as bsddb_db
 from gettext import gettext as _
 from DdTargets import DdTargets
 import pickle
$NetBSD$

--- src/GrampsDbUtils/_GrampsBSDDB.py.orig      2008-05-17 16:15:28.000000000 -0400
+++ src/GrampsDbUtils/_GrampsBSDDB.py
@@ -35,7 +35,7 @@ import cPickle as pickle
 import os
 import time
 from gettext import gettext as _
-from bsddb import dbshelve, db
+from bsddb3 import dbshelve, db
 import logging
 __LOG = logging.getLogger(".GrampsDb")

$NetBSD$

--- src/GrampsLogger/_ErrorReportAssistant.py.orig      2008-05-17 16:15:03.000000000 -0400
+++ src/GrampsLogger/_ErrorReportAssistant.py
@@ -2,7 +2,7 @@ from gettext import gettext as _
 import Assistant
 import const
 import gtk
-import sys, os,bsddb
+import sys, os, bsddb3



@@ -99,7 +99,7 @@ class ErrorReportAssistant:
               "OS: %s\n"\
               "Distribution: %s\n"\
               % (str(sys.version).replace('\n',''),
-                  str(bsddb.__version__),
+                  str(bsddb3.__version__),
                  str(const.VERSION),
                  os.environ.get('LANG',''),
                  operatingsystem,
$NetBSD$

--- src/gen/db/base.py.orig     2008-05-17 16:14:29.000000000 -0400
+++ src/gen/db/base.py
@@ -36,7 +36,7 @@ import random
 import locale
 import os
 from sys import maxint
-from bsddb import db
+from bsddb3 import db
 from gettext import gettext as _

 import logging
$NetBSD$

--- src/gen/db/dbdir.py.orig    2008-05-17 22:14:29.000000000 +0200
+++ src/gen/db/dbdir.py
@@ -36,7 +36,7 @@ import time
 from types import InstanceType

 from gettext import gettext as _
-from bsddb import dbshelve, db
+from bsddb3 import dbshelve, db
 import logging

 _LOG = logging.getLogger(".GrampsDb")
@@ -480,7 +480,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
        # These env settings are only needed for Txn environment
        self.env.set_lk_max_locks(25000)
        self.env.set_lk_max_objects(25000)
-        self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)  # clean up unused logs
+        self.env.set_flags(db.DB_LOG_AUTO_REMOVE, 1)  # clean up unused logs

        # The DB_PRIVATE flag must go if we ever move to multi-user setup
        env_flags = db.DB_CREATE | db.DB_PRIVATE |\
@@ -1556,7 +1556,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
        transaction = BdbTransaction(msg, self.undodb, batch, no_magic)
        if transaction.batch:
            self.env.txn_checkpoint()
-            self.env.set_flags(db.DB_TXN_NOSYNC, 1)      # async txn
+#            self.env.set_flags(db.DB_TXN_NOSYNC, 1)      # async txn

            if self.secondary_connected and not transaction.no_magic:
                # Disconnect unneeded secondary indices
@@ -1594,7 +1594,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
        self.txn.commit()
        if transaction.batch:
            self.env.txn_checkpoint()
-            self.env.set_flags(db.DB_TXN_NOSYNC, 0)      # sync txn
+#            self.env.set_flags(db.DB_TXN_NOSYNC, 0)      # sync txn

            if not transaction.no_magic:
                # create new secondary indices to replace the ones removed
@@ -1697,7 +1697,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCa
        # These env settings are only needed for Txn environment
        self.env.set_lk_max_locks(25000)
        self.env.set_lk_max_objects(25000)
-        self.env.set_flags(db.DB_LOG_AUTOREMOVE, 1)  # clean up unused logs
+        self.env.set_flags(db.DB_LOG_AUTO_REMOVE, 1)  # clean up unused logs

        # The DB_PRIVATE flag must go if we ever move to multi-user setup
        env_flags = db.DB_CREATE | db.DB_PRIVATE |\
$NetBSD$

--- src/plugins/Leak.py.orig    2008-05-17 16:14:56.000000000 -0400
+++ src/plugins/Leak.py
@@ -31,7 +31,7 @@ Show uncollected objects in a window.
 #------------------------------------------------------------------------
 import os
 from gettext import gettext as _
-from bsddb.db import DBError
+from bsddb3.db import DBError

 #------------------------------------------------------------------------
 #
$NetBSD: patch-ba,v 1.1 2008/06/23 15:44:14 drochner Exp $

--- src/gramps.py.orig  2008-05-17 22:15:36.000000000 +0200
+++ src/gramps.py
@@ -94,7 +94,7 @@ gettext.install("gramps",loc,unicode=1)
 #
 #-------------------------------------------------------------------------

-MIN_PYTHON_VERSION = (2, 5, 0, '', 0)
+MIN_PYTHON_VERSION = (2, 4, 0, '', 0)
 if not sys.version_info >= MIN_PYTHON_VERSION :
    print gettext.gettext("Your Python version does not meet the "
                  "requirements. At least python %d.%d.%d is needed to"
$NetBSD: patch-bb,v 1.1 2008/06/23 15:44:14 drochner Exp $

--- src/plugins/all_relations.py.orig   2008-05-17 22:14:56.000000000 +0200
+++ src/plugins/all_relations.py
@@ -47,7 +47,7 @@ def run(database, document, person):
    report = AllRelReport(database, document, person)
    report.run()

-class AllRelReport():
+class AllRelReport:
    """
    Obtains all relationships, displays the relations, and in details, the
    relation path
$NetBSD: patch-bc,v 1.1 2008/06/23 15:44:14 drochner Exp $

--- configure.orig      2008-05-17 22:33:13.000000000 +0200
+++ configure
@@ -6289,12 +6289,12 @@ echo "${ECHO_T}$LINGUAS" >&6; }

        if test -n "$PYTHON"; then
      # If the user set $PYTHON, use it and don't search something else.
-      { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.5" >&5
-echo $ECHO_N "checking whether $PYTHON version >= 2.5... $ECHO_C" >&6; }
+      { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.4" >&5
+echo $ECHO_N "checking whether $PYTHON version >= 2.4... $ECHO_C" >&6; }
      prog="import sys, string
 # split strings by '.' and convert to numeric.  Append some zeros
 # because we need at least 4 digits for the hex conversion.
-minver = map(int, string.split('2.5', '.')) + [0, 0, 0]
+minver = map(int, string.split('2.4', '.')) + [0, 0, 0]
 minverhex = 0
 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
 sys.exit(sys.hexversion < minverhex)"

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gramps-devel mailing list
Gramps-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-devel