[pybsddb] Where can I get build instruction for Windows / Python 3.2?

Baptiste Lepilleur baptiste.lepilleur at gmail.com
Thu Jun 9 09:03:31 CEST 2011


Thanks for the pointer, I'll check this out.

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.

Here is a synthesis of the issues I run into:
1) incdir/libdir are initialized in a hard-coded way. It ignores any value
provided on the command-line (only used by Unix)
2) assertion was checking if the version was supported, but 'db_ver_list'
was only defined for Unix section
3) the tuple build for version number was build with string instead of int
4) the dependencies on system libraries were not provided on link, with
caused unresolved symbols
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...)

Baptiste.


307,308c307,314
<     incdir = 'db/include'
<     libdir = 'db/lib'
---
>     #incdir = 'db/include'
>     incdir =
r'e:\prg\py\App\doc2keywords\thirdparties\pybsddb\db-5.1.25\build_windows'
>     #libdir = 'db/lib'
>     libdir =
r'e:\prg\py\App\doc2keywords\thirdparties\pybsddb\db-5.1.25\build_windows\Win32\Release_static'
>
>     # Supported Berkeley DB versions, in order of preference.
>     db_ver_list = ((5, 1), (5, 0),
>             (4, 8), (4, 7), (4, 6), (4, 5), (4, 4), (4, 3), (4, 2))
321c327
<     assert (fullverstr[0], fullverstr[2]) in db_ver_list, (
---
>     assert (int(fullverstr[0]), int(fullverstr[2])) in db_ver_list, (
324a331
>     dep_libs = ['ws2_32', 'Advapi32'] # WIN32 dependencies
326c333
<         libname = ['libdb%ssd' % ver]     # Debug, static
---
>         libname = ['libdb%ssd' % ver ] + dep_libs     # Debug, static
328c335
<         libname = ['libdb%ss' % ver]      # Release, static
---
>         libname = ['libdb%ss' % ver] + dep_libs      # Release, static
388c395
<                                runtime_library_dirs = [ libdir ],
---
> #                               runtime_library_dirs = [ libdir ], # blow
up on Windows


2011/6/8 Dmitry Dvoinikov <dmitry at targeted.org>

> Hi Baptiste,
>
> Binary builds for Windows can be found here:
> http://www.pythomnic3k.org/download.html
>
> Dmitry
>
> On 08.06.2011 14:07, Baptiste Lepilleur wrote:
>
>> Hi,
>>
>> I just downloadedВ bsddb3-5.1.2 but can notВ В find build instruction
>>
>> for Windows. The README.txt says to get the binary package, but I can
>> not find a binary download.
>>
>> When I try to build using the Unix instruction (see below), it seems
>> that setup is ignoring the path I provide for BerkleyDB directory (db.h
>> is located inВ c:\wut\files\BerkeleyDB\include\db.h).
>>
>>
>> What am I doing wrong?
>>
>> ---
>> python setup.py --berkeley-db=c:\wut\files\BerkeleyDB build
>>
>> Traceback (most recent call last):
>> В  File "setup.py", line 7, in <module>
>> В  В  import setup3
>> В  File
>>
>> "E:\prg\py\App\doc2keywords\thirdparties\pybsddb\bsddb3-5.1.2\setup3.py",
>> line
>> 312, in <module>
>> В  В  db_h_lines = open(os.path.join(incdir, 'db.h'), 'r').readlines()
>>
>> IOError: [Errno 2] No such file or directory: 'db/include\\db.h'
>> ---
>>
>> Baptiste
>> .
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20110609/12960d0e/attachment.htm>


More information about the pybsddb mailing list