Kaydet (Commit) 78e35f93 authored tarafından Tim Peters's avatar Tim Peters

Move Windows Python away from bsddb 1.85 and toward Sleepycat's latest.

The bsddb subproject is gone.
The _bsddb subproject is new.
There are problems here, but I'm out of time to work on this now.  If
anyone can address an XXX comment or two in readme.txt, please do!
üst 26897bf1
...@@ -508,6 +508,7 @@ _expectations = { ...@@ -508,6 +508,7 @@ _expectations = {
'win32': 'win32':
""" """
test_al test_al
test_bsddb3
test_cd test_cd
test_cl test_cl
test_commands test_commands
......
# Microsoft Developer Studio Project File - Name="bsddb" - Package Owner=<4> # Microsoft Developer Studio Project File - Name="_bsddb" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT ** # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=bsddb - Win32 Release CFG=_bsddb - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run !MESSAGE use the Export Makefile command and run
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "bsddb.mak". !MESSAGE NMAKE /f "_bsddb.mak".
!MESSAGE !MESSAGE
!MESSAGE You can specify a configuration when running NMAKE !MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "bsddb.mak" CFG="bsddb - Win32 Release" !MESSAGE NMAKE /f "_bsddb.mak" CFG="_bsddb - Win32 Release"
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
!MESSAGE "bsddb - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "_bsddb - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "bsddb - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") !MESSAGE "_bsddb - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
# PROP AllowPerConfigDependencies 0 # PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "bsddb" # PROP Scc_ProjName "_bsddb"
# PROP Scc_LocalPath ".." # PROP Scc_LocalPath ".."
CPP=cl.exe CPP=cl.exe
MTL=midl.exe MTL=midl.exe
RSC=rc.exe RSC=rc.exe
!IF "$(CFG)" == "bsddb - Win32 Release" !IF "$(CFG)" == "_bsddb - Win32 Release"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0 # PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release" # PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release" # PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 0 # PROP Use_Debug_Libraries 0
# PROP Output_Dir "." # PROP Output_Dir "."
# PROP Intermediate_Dir "x86-temp-release\bsddb" # PROP Intermediate_Dir "x86-temp-release\_bsddb"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
F90=df.exe F90=df.exe
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\Include" /I "..\PC" /I "..\..\bsddb\include" /I "..\..\bsddb\port\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\Include" /I "..\PC" /I "..\..\db-4.0.14\build_win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\bsddb\port\win32\db.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /out:"./bsddb.pyd" # ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\db-4.0.14\build_win32\Release\libdb40.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /out:"./_bsddb.pyd"
# SUBTRACT LINK32 /pdb:none # SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "bsddb - Win32 Debug" !ELSEIF "$(CFG)" == "_bsddb - Win32 Debug"
# PROP BASE Use_MFC 0 # PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1 # PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug" # PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug" # PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir "" # PROP BASE Target_Dir ""
# PROP Use_MFC 0 # PROP Use_MFC 0
# PROP Use_Debug_Libraries 1 # PROP Use_Debug_Libraries 1
# PROP Output_Dir "." # PROP Output_Dir "."
# PROP Intermediate_Dir "x86-temp-debug\bsddb" # PROP Intermediate_Dir "x86-temp-debug\_bsddb"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
F90=df.exe F90=df.exe
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /I "..\..\bsddb\include" /I "..\..\bsddb\port\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\Include" /I "..\PC" /I "..\..\db-4.0.14\build_win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\bsddb\port\win32\db.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"MSVCRT" /out:"./bsddb_d.pyd" /pdbtype:sept # ADD LINK32 user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\db-4.0.14\build_win32\Release\libdb40.lib /nologo /base:"0x1e180000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"MSVCRT" /out:"./_bsddb_d.pyd" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none # SUBTRACT LINK32 /pdb:none
!ENDIF !ENDIF
# Begin Target # Begin Target
# Name "bsddb - Win32 Release" # Name "_bsddb - Win32 Release"
# Name "bsddb - Win32 Debug" # Name "_bsddb - Win32 Debug"
# Begin Source File # Begin Source File
SOURCE=..\Modules\bsddbmodule.c SOURCE=..\Modules\_bsddb.c
# End Source File
!IF "$(CFG)" == "bsddb - Win32 Release" # End Target
# End Project
# ADD CPP /I "..\..\bsddb\PORT\win32\include" /I "..\..\bsddb\PORT\include" /D "__DBINTERFACE_PRIVATE"
# SUBTRACT CPP /X /I "..\..\bsddb\port\include"
!ELSEIF "$(CFG)" == "bsddb - Win32 Debug"
# ADD CPP /I "..\..\bsddb\PORT\win32\include" /I "..\..\bsddb\PORT\include" /D "__DBINTERFACE_PRIVATE"
# SUBTRACT CPP /I "..\..\bsddb\port\include"
!ENDIF
# End Source File
# End Target
# End Project
This patch is against Sleepycat's db-4.0.14 release. It's not on the
Sleepycat site. It fixes cases of database corruption Barry (Warsaw)
was seeing, and Barry got it from Sleepycat.
*** db/db_reclaim.c.orig 2002/04/05 16:16:17 11.22
--- db/db_reclaim.c 2002/04/10 18:53:13 11.23
***************
*** 195,202 ****
dbp->log_fileid, p->pgno, &LSN(meta),
PGNO_BASE_MD, &ldbt, meta->free)) != 0)
goto err;
-
LSN(p) = LSN(meta);
if ((ret =
__db_pg_alloc_log(dbp->dbenv,
param->dbc->txn, &LSN(meta), 0,
--- 195,202 ----
dbp->log_fileid, p->pgno, &LSN(meta),
PGNO_BASE_MD, &ldbt, meta->free)) != 0)
goto err;
LSN(p) = LSN(meta);
+
if ((ret =
__db_pg_alloc_log(dbp->dbenv,
param->dbc->txn, &LSN(meta), 0,
***************
*** 206,211 ****
--- 206,213 ----
(void)__TLPUT(param->dbc, metalock);
return (ret);
}
+ LSN(p) = LSN(meta);
+
if ((ret = mpf->put(mpf,
(PAGE *)meta, DB_MPOOL_DIRTY)) != 0) {
(void)__TLPUT(param->dbc, metalock);
...@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 ...@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
############################################################################### ###############################################################################
Project: "_socket"=.\_socket.dsp - Package Owner=<4> Project: "_bsddb"=.\_bsddb.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -11,14 +11,11 @@ Package=<5> ...@@ -11,14 +11,11 @@ Package=<5>
Package=<4> Package=<4>
{{{ {{{
Begin Project Dependency
Project_Dep_Name pythoncore
End Project Dependency
}}} }}}
############################################################################### ###############################################################################
Project: "_sre"=.\_sre.dsp - Package Owner=<4> Project: "_socket"=.\_socket.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -33,7 +30,7 @@ Package=<4> ...@@ -33,7 +30,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "_symtable"=.\_symtable.dsp - Package Owner=<4> Project: "_sre"=.\_sre.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -48,7 +45,7 @@ Package=<4> ...@@ -48,7 +45,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "_testcapi"=.\_testcapi.dsp - Package Owner=<4> Project: "_symtable"=.\_symtable.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -63,7 +60,7 @@ Package=<4> ...@@ -63,7 +60,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "_tkinter"=.\_tkinter.dsp - Package Owner=<4> Project: "_testcapi"=.\_testcapi.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -78,7 +75,7 @@ Package=<4> ...@@ -78,7 +75,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "bsddb"=.\bsddb.dsp - Package Owner=<4> Project: "_tkinter"=.\_tkinter.dsp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
......
...@@ -160,19 +160,38 @@ bz2 ...@@ -160,19 +160,38 @@ bz2
project links in. project links in.
_bsddb
Go to Sleepycat's patches page:
http://www.sleepycat.com/update/index.html
and download
4.0.14.zip
from the download page. The file name is db-4.0.14.zip. Unpack into
dist\db-4.0.14
Apply the patch file bsddb_patch.txt in this (PCbuild) directory
against the file
dist\db-4.0.14\db\db_reclaim.c
Go to
http://www.sleepycat.com/docs/ref/build_win/intro.html
and follow the instructions for building the Sleepycat software.
Build the Release version.
XXX You have to copy
XXX dist\db-4.0.14\build_win32\Release\libdb40.dll
XXX into PCbuild (or elsewhere on your path) before the tests
XXX will run.
XXX A debug-mode build blows up when running this, presumably because
XXX I'm mixing debug-mode MS stuff with Sleepycat's release-mode
XXX DLL. This gives me a headache. I would *like* to, as the old
XXX bsddb 1.85 project apparently managed to do, link the Berkeley
XXX DLL into the guts of our _bsddb.pyd. I don't know how to.
XXX The installer needs to be changed accordingly.
bsddb XXX The Sleepycat release we use will probably change before
Python wrapper for the BSD database 1.85. Requires db.1.85.win32.zip, XXX 2.3a1.
from the "bsd db" link at
http://www.nightmare.com/software.html
Unpack into dist\bsddb.
You then need to compile it: cd to dist\bsddb\Port\win32, and run
nmake -f makefile_nt.msc
This builds bsddb\Port\win32\db.lib, which the MSVC project links in.
Note that if you're running Win9X, you'll need to run vcvars32.bat
before running nmake (this batch file is in your MSVC installation).
TODO: make this work like zlib (in particular, MSVC runs the prelink
step in an enviroment that already has the correct envars set up).
YOUR OWN EXTENSION DLLs YOUR OWN EXTENSION DLLs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment