Thanks for the pointer, I'll check this out.<div><br></div><div>I looked into the issues and it seems that the setup3.py script can not possibly work on windows. Below is a small patch with the changes I had to make it works (pass all tests), though it contains some hard-coded value and can not be reused as is.</div>
<div><br></div><div>Here is a synthesis of the issues I run into:</div><div>1) incdir/libdir are initialized in a hard-coded way. It ignores any value provided on the command-line (only used by Unix)</div><div>2) assertion was checking if the version was supported, but 'db_ver_list' was only defined for Unix section</div>
<div>3) the tuple build for version number was build with string instead of int</div><div>4) the dependencies on system libraries were not provided on link, with caused unresolved symbols</div><div>5) Unsupported 'runtime_library_dirs' is passed on Windows to distutils which causes the build to fail. (somewhat inconsistent as it first emit a warning...)</div>
<div><br></div><div>Baptiste.</div><div><br></div><div><br></div><div><div>307,308c307,314</div><div>< incdir = 'db/include'</div><div>< libdir = 'db/lib'</div><div>---</div><div>> #incdir = 'db/include'</div>
<div>> incdir = r'e:\prg\py\App\doc2keywords\thirdparties\pybsddb\db-5.1.25\build_windows'</div><div>> #libdir = 'db/lib'</div><div>> libdir = r'e:\prg\py\App\doc2keywords\thirdparties\pybsddb\db-5.1.25\build_windows\Win32\Release_static'</div>
<div>> </div><div>> # Supported Berkeley DB versions, in order of preference.</div><div>> db_ver_list = ((5, 1), (5, 0),</div><div>> (4, 8), (4, 7), (4, 6), (4, 5), (4, 4), (4, 3), (4, 2))</div>
<div>321c327</div><div>< assert (fullverstr[0], fullverstr[2]) in db_ver_list, (</div><div>---</div><div>> assert (int(fullverstr[0]), int(fullverstr[2])) in db_ver_list, (</div><div>324a331</div><div>> dep_libs = ['ws2_32', 'Advapi32'] # WIN32 dependencies</div>
<div>326c333</div><div>< libname = ['libdb%ssd' % ver] # Debug, static</div><div>---</div><div>> libname = ['libdb%ssd' % ver ] + dep_libs # Debug, static</div><div>328c335</div>
<div>< libname = ['libdb%ss' % ver] # Release, static</div><div>---</div><div>> libname = ['libdb%ss' % ver] + dep_libs # Release, static</div><div>388c395</div><div>< runtime_library_dirs = [ libdir ],</div>
<div>---</div><div>> # runtime_library_dirs = [ libdir ], # blow up on Windows</div><div><br></div><br><div class="gmail_quote">2011/6/8 Dmitry Dvoinikov <span dir="ltr"><<a href="mailto:dmitry@targeted.org">dmitry@targeted.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Baptiste,<br>
<br>
Binary builds for Windows can be found here:<br>
<a href="http://www.pythomnic3k.org/download.html" target="_blank">http://www.pythomnic3k.org/download.html</a><br>
<br>
Dmitry<br>
<br>
On 08.06.2011 14:07, Baptiste Lepilleur wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I just downloadedВ bsddb3-5.1.2 but can notВ В find build instruction<div class="im"><br>
for Windows. The README.txt says to get the binary package, but I can<br>
not find a binary download.<br>
<br>
When I try to build using the Unix instruction (see below), it seems<br>
that setup is ignoring the path I provide for BerkleyDB directory (db.h<br></div>
is located inВ c:\wut\files\BerkeleyDB\include\db.h).<div class="im"><br>
<br>
What am I doing wrong?<br>
<br>
---<br>
python setup.py --berkeley-db=c:\wut\files\BerkeleyDB build<br>
<br>
Traceback (most recent call last):<br></div>
В File "setup.py", line 7, in <module><br>
В В import setup3<br>
В File<div class="im"><br>
"E:\prg\py\App\doc2keywords\thirdparties\pybsddb\bsddb3-5.1.2\setup3.py", line<br>
312, in <module><br></div>
В В db_h_lines = open(os.path.join(incdir, 'db.h'), 'r').readlines()<div class="im"><br>
IOError: [Errno 2] No such file or directory: 'db/include\\db.h'<br>
---<br>
<br>
Baptiste<br>.<br><br><br></div></blockquote></blockquote></div><br></div>