Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
da045147
Commit
da045147
authored
Jan 05, 2007
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support linking of the bsddb module against BerkeleyDB 4.5.x
(will backport to 2.5)
parent
507761da
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
7 deletions
+18
-7
Doc/lib/libbsddb.tex
Doc/lib/libbsddb.tex
+1
-1
Lib/bsddb/dbobj.py
Lib/bsddb/dbobj.py
+3
-2
Lib/bsddb/test/test_1413192.py
Lib/bsddb/test/test_1413192.py
+1
-1
Misc/NEWS
Misc/NEWS
+2
-0
Modules/_bsddb.c
Modules/_bsddb.c
+8
-0
setup.py
setup.py
+3
-3
No files found.
Doc/lib/libbsddb.tex
View file @
da045147
...
...
@@ -16,7 +16,7 @@ serialize them somehow, typically using \function{marshal.dumps()} or
\function
{
pickle.dumps()
}
.
The
\module
{
bsddb
}
module requires a Berkeley DB library version from
3.3 thru 4.
4
.
3.3 thru 4.
5
.
\begin{seealso}
\seeurl
{
http://pybsddb.sourceforge.net/
}
...
...
Lib/bsddb/dbobj.py
View file @
da045147
...
...
@@ -55,8 +55,9 @@ class DBEnv:
return
apply
(
self
.
_cobj
.
set_lg_max
,
args
,
kwargs
)
def
set_lk_detect
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
set_lk_detect
,
args
,
kwargs
)
def
set_lk_max
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
set_lk_max
,
args
,
kwargs
)
if
db
.
version
()
<
(
4
,
5
):
def
set_lk_max
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
set_lk_max
,
args
,
kwargs
)
def
set_lk_max_locks
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
set_lk_max_locks
,
args
,
kwargs
)
def
set_lk_max_lockers
(
self
,
*
args
,
**
kwargs
):
...
...
Lib/bsddb/test/test_1413192.py
View file @
da045147
...
...
@@ -14,7 +14,7 @@ except ImportError:
env_name
=
'.'
env
=
db
.
DBEnv
()
env
.
open
(
env_name
,
db
.
DB_CREATE
|
db
.
DB_INIT_TXN
)
env
.
open
(
env_name
,
db
.
DB_CREATE
|
db
.
DB_INIT_TXN
|
db
.
DB_INIT_MPOOL
)
the_txn
=
env
.
txn_begin
()
map
=
db
.
DB
(
env
)
...
...
Misc/NEWS
View file @
da045147
...
...
@@ -322,6 +322,8 @@ Extension Modules
been
defined
.
This
prevents
an
interactive
Python
from
waking
up
10
times
per
second
.
Patch
by
Richard
Boulton
.
-
Added
support
for
linking
the
bsddb
module
against
BerkeleyDB
4.5
.
x
.
Tests
-----
...
...
Modules/_bsddb.c
View file @
da045147
...
...
@@ -4127,6 +4127,7 @@ DBEnv_set_lk_detect(DBEnvObject* self, PyObject* args)
}
#if (DBVER < 45)
static
PyObject
*
DBEnv_set_lk_max
(
DBEnvObject
*
self
,
PyObject
*
args
)
{
...
...
@@ -4142,6 +4143,7 @@ DBEnv_set_lk_max(DBEnvObject* self, PyObject* args)
RETURN_IF_ERR
();
RETURN_NONE
();
}
#endif
#if (DBVER >= 32)
...
...
@@ -5231,7 +5233,9 @@ static PyMethodDef DBEnv_methods[] = {
{
"set_lg_regionmax"
,(
PyCFunction
)
DBEnv_set_lg_regionmax
,
METH_VARARGS
},
#endif
{
"set_lk_detect"
,
(
PyCFunction
)
DBEnv_set_lk_detect
,
METH_VARARGS
},
#if (DBVER < 45)
{
"set_lk_max"
,
(
PyCFunction
)
DBEnv_set_lk_max
,
METH_VARARGS
},
#endif
#if (DBVER >= 32)
{
"set_lk_max_locks"
,
(
PyCFunction
)
DBEnv_set_lk_max_locks
,
METH_VARARGS
},
{
"set_lk_max_lockers"
,
(
PyCFunction
)
DBEnv_set_lk_max_lockers
,
METH_VARARGS
},
...
...
@@ -5833,7 +5837,9 @@ DL_EXPORT(void) init_bsddb(void)
ADD_INT
(
d
,
DB_AFTER
);
ADD_INT
(
d
,
DB_APPEND
);
ADD_INT
(
d
,
DB_BEFORE
);
#if (DBVER < 45)
ADD_INT
(
d
,
DB_CACHED_COUNTS
);
#endif
#if (DBVER >= 41)
_addIntToDict
(
d
,
"DB_CHECKPOINT"
,
0
);
#else
...
...
@@ -5868,7 +5874,9 @@ DL_EXPORT(void) init_bsddb(void)
ADD_INT
(
d
,
DB_POSITION
);
ADD_INT
(
d
,
DB_PREV
);
ADD_INT
(
d
,
DB_PREV_NODUP
);
#if (DBVER < 45)
ADD_INT
(
d
,
DB_RECORDCOUNT
);
#endif
ADD_INT
(
d
,
DB_SET
);
ADD_INT
(
d
,
DB_SET_RANGE
);
ADD_INT
(
d
,
DB_SET_RECNO
);
...
...
setup.py
View file @
da045147
...
...
@@ -606,7 +606,7 @@ class PyBuildExt(build_ext):
# a release. Most open source OSes come with one or more
# versions of BerkeleyDB already installed.
max_db_ver = (4,
4
)
max_db_ver = (4,
5
)
min_db_ver = (3, 3)
db_setup_debug = False # verbose debug prints from this script?
...
...
@@ -623,7 +623,7 @@ class PyBuildExt(build_ext):
'/sw/include/db3',
]
# 4.x minor number specific paths
for x in (0,1,2,3,4):
for x in (0,1,2,3,4
,5
):
db_inc_paths.append('/usr/include/db4%d' % x)
db_inc_paths.append('/usr/include/db4.%d' % x)
db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
...
...
@@ -631,7 +631,7 @@ class PyBuildExt(build_ext):
db_inc_paths.append('/pkg/db-4.%d/include' % x)
db_inc_paths.append('/opt/db-4.%d/include' % x)
# 3.x minor number specific paths
for x in (
2,3
):
for x in (
3,
):
db_inc_paths.append('/usr/include/db3%d' % x)
db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
db_inc_paths.append('/usr/local/include/db3%d' % x)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment