Creating and merging libraries on win32 is difficult :)
My assumptions:
- python27 (I have Python ActiveState, but python.org should be fine) in c: \ python27
- visual studio 2010 professional (I think express should work too)
Download bdb and pysqlite (this time I have 2.6.3) and put it in c:\bdb , unzip bdb so you have
C:\bdb\db-5.2.36
go to C:\bdb\db-5.2.36\build_windows select Berkeley_DB_vs2010.sln , select Static Release as configuration and build
you need to have libdb52s.lib and libdb_sql52s.lib in
C:\bdb\db-5.2.36\build_windows\Win32\Static Release
now unzip pysqlite to c:\bdb , go to C:\bdb\pysqlite-2.6.3 and edit setup.cfg as follows:
[build_ext] include_dirs=C:\bdb\db-5.2.36\lang\sql\generated library_dirs=C:\bdb\db-5.2.36\build_windows\Win32\Static Release define=SQLITE_OMIT_LOAD_EXTENSION
be sure to delete the libraries = I had to add them to setup.py, because of the static link we need to specify more than one library, if someone knows a way to list in setup.cfg, tell me :)
now open setup.py on line 191 and replace:
libraries=libraries
from:
libraries=['libdb_sql52s', 'libdb52s', 'ws2_32', 'advapi32'],
open vs2010 command line (in the visual studio tools menu)
go to c:\bdb\pysqlite
set DISTUTILS_USE_SDK=1 set MSSdk=1 python setup.py build
source share