1 diff -up Python-2.5.1/Modules/_bsddb.c.db46 Python-2.5.1/Modules/_bsddb.c
2 --- Python-2.5.1/Modules/_bsddb.c.db46 2007-01-04 21:09:06.000000000 -0500
3 +++ Python-2.5.1/Modules/_bsddb.c 2008-07-10 09:58:55.000000000 -0400
4 @@ -5306,11 +5306,13 @@ static PyObject*
5 DBEnv_getattr(DBEnvObject* self, char *name)
7 if (!strcmp(name, "db_home")) {
8 + const char *home = NULL;
9 CHECK_ENV_NOT_CLOSED(self);
10 - if (self->db_env->db_home == NULL) {
11 + self->db_env->get_home(self->db_env, &home);
15 - return PyString_FromString(self->db_env->db_home);
16 + return PyString_FromString(home);
19 return Py_FindMethod(DBEnv_methods, (PyObject* )self, name);
20 @@ -5932,22 +5934,37 @@ DL_EXPORT(void) init_bsddb(void)
21 ADD_INT(d, DB_TIME_NOTGRANTED);
22 ADD_INT(d, DB_TXN_NOT_DURABLE);
23 ADD_INT(d, DB_TXN_WRITE_NOSYNC);
24 - ADD_INT(d, DB_LOG_AUTOREMOVE);
25 - ADD_INT(d, DB_DIRECT_LOG);
26 ADD_INT(d, DB_DIRECT_DB);
27 ADD_INT(d, DB_INIT_REP);
28 ADD_INT(d, DB_ENCRYPT);
29 ADD_INT(d, DB_CHKSUM);
32 +#if (DBVER >= 42) && (DBVER < 47)
33 + ADD_INT(d, DB_LOG_AUTOREMOVE);
34 + ADD_INT(d, DB_DIRECT_LOG);
38 + ADD_INT(d, DB_LOG_DIRECT);
39 + ADD_INT(d, DB_LOG_DSYNC);
40 + ADD_INT(d, DB_LOG_IN_MEMORY);
41 + ADD_INT(d, DB_LOG_AUTO_REMOVE);
42 + ADD_INT(d, DB_LOG_ZERO);
46 - ADD_INT(d, DB_LOG_INMEMORY);
47 ADD_INT(d, DB_BUFFER_SMALL);
48 ADD_INT(d, DB_SEQ_DEC);
49 ADD_INT(d, DB_SEQ_INC);
50 ADD_INT(d, DB_SEQ_WRAP);
53 +#if (DBVER >= 43) && (DBVER < 47)
54 + ADD_INT(d, DB_LOG_INMEMORY);
55 + ADD_INT(d, DB_DSYNC_LOG);
59 ADD_INT(d, DB_ENCRYPT_AES);
60 ADD_INT(d, DB_AUTO_COMMIT);
61 diff -up Python-2.5.1/setup.py.db46 Python-2.5.1/setup.py
62 --- Python-2.5.1/setup.py.db46 2008-07-10 09:55:08.000000000 -0400
63 +++ Python-2.5.1/setup.py 2008-07-10 09:55:08.000000000 -0400
64 @@ -606,9 +606,9 @@ class PyBuildExt(build_ext):
65 # a release. Most open source OSes come with one or more
66 # versions of BerkeleyDB already installed.
71 - db_setup_debug = False # verbose debug prints from this script?
72 + db_setup_debug = True # verbose debug prints from this script?
74 # construct a list of paths to look for the header file in on
75 # top of the normal inc_dirs.
76 @@ -623,7 +623,7 @@ class PyBuildExt(build_ext):
79 # 4.x minor number specific paths
80 - for x in (0,1,2,3,4,5):
81 + for x in (0,1,2,3,4,5,6,7):
82 db_inc_paths.append('/usr/include/db4%d' % x)
83 db_inc_paths.append('/usr/include/db4.%d' % x)
84 db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
85 @@ -646,7 +646,7 @@ class PyBuildExt(build_ext):
87 std_variants.append(os.path.join(dn, 'db3'))
88 std_variants.append(os.path.join(dn, 'db4'))
89 - for x in (0,1,2,3,4):
90 + for x in (0,1,2,3,4,5,6,7):
91 std_variants.append(os.path.join(dn, "db4%d"%x))
92 std_variants.append(os.path.join(dn, "db4.%d"%x))