A glitch appears when trying to build out of the box as instructed in src/python/README
. Minor tweaking with types was necessary in the dbxml_python_wrap.cpp
file. Here's output from diff(1):
2058c2058 < const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); --- > char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 3001c3001 < char *cstr; Py_ssize_t len; --- > char *cstr; int len; 36695c36695 < const char *c = methods[i].ml_doc; --- > char *c = methods[i].ml_doc; 36699c36699 < const char *name = c + 10; --- > char *name = c + 10;
This same problem was discussed in DB XML forums (which, for some reason, seem to be off line a lot of time; what's wrong, Oracle?). After those minor modifications, build went as advertised:
cd bsddb3-4.5.0 python setup.dbxml.py build sudo python setup.dbxml.py install cd .. python setup.py build sudo python setup.py install
After the build these basic tests passed:
>>> from bsddb3.db import * >>> from dbxml import * >>> print version() (4, 5, 20) >>> mgr=XmlManager() >>> print mgr.get_version_string() Oracle: Berkeley DB XML 2.3.10: (January 30, 2007)
Running the tests (python examples.py test
) also passed just fine. Great!