# $Id: README,v 1.7 2005/04/05 16:44:20 bostic Exp $

Python module for Sleepycat's Berkeley DB XML library
Copyright (c) 2003-2005
	Sleepycat Software.  All rights reserved.

INTRODUCTION

This module is built using SWIG (http://www.swig.org) to produce a
Python module that maps to the Berkeley DB XML C++ API fairly closely.
At present, separate documentation for the Python API is not provided.
Refer to the C++ API documentation and the Python examples for more
information, or contact Sleepycat Support (support@sleepycat.com).

BUILD REQUIREMENTS

To build and install this module, you first need:

  * Python 2.3 or newer

  * an installed version of the bsddb3 Python module that supports 
    DB 4.3 (http://pybsddb.sourceforge.net).  Note: this module has been
    accepted into the Python core, and ships with Python 2.3 and
    above.  Also, note that this module must be compiled against the
    same version of Berkeley DB you are building Berkeley DB XML
    against.  If there is a collision in module name, it may
    be necessary to rename the module you build.  If so, it will
    also be necessary to change the import lines in the python example
    code.

  * a working build of Berkeley DB XML compiled with the same C++
    compiler as Python.

This module uses the standard Python distutils to control building and
installing into the Python tree.  It is assumed that you have
already built Berkeley DB Python support, and it is installed.

BUILDING

1.  Ensure that setup.py is correct.  The key variables are
db_home, xerces_home, pathan_home, and xquery_home
    a.  Unix.  The variables should be correct, based
    on your input to the dist/configure script, which modifies
    the setup.py file.  They can be modified by using --with-<module>=<path>
    options when executing setup.py.  See setup.py for details.

    b.  Windows.  The values for the variables are based
    on the default installation.  If your installation is not
    default, hand edit setup.py to reflect the actual locations
    of the products.

Note: the variables are primarily used to locate the libraries
BDB XML requires for linking, and not for include file locations.
    
2. Run the build:

    python setup.py build

3. Install:

    python setup.py install

TESTING

The Python examples are in the directory examples/python in the top of the
Berkeley DB XML tree.  Once this module is installed, the examples can
be run in that directory with:

    python examples.py test

If you want to test before installing, you will need to build and set
PYTHONPATH to include the build directory (src/python/build/lib.*).

For more information, contact Sleepycat Support (support@sleepycat.com).
