#!/bin/sh -
#       $Id: s_python,v 1.2 2003/02/20 04:48:34 mjc Exp $
#
# Build setup.py for the Python API with our default library paths.

. RELEASE

PYTHON_SRCDIR=../src/python
f=$PYTHON_SRCDIR/setup.py
t=/tmp/__t
trap 'rm -f $t; exit 0' 0 1 2 3 13 15

sed -e "s/@DBXML_VERSION_MAJOR@/$DBXML_VERSION_MAJOR/g" \
      -e "s/@DBXML_VERSION_MINOR@/$DBXML_VERSION_MINOR/g" \
      -e "s/@DBXML_VERSION_PATCH@/$DBXML_VERSION_PATCH/g" \
      -f lib_paths.sed $f.in > $t

cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
