#!/bin/bash
# 
# Create the build environment for gnue-common
# Usage: create-build <package-directory>

packagedir=$1
if [ ! -d "$packagedir" ];
then
  echo "Usage: $0 <package-directory>"
  exit 1
fi


if [ ! -f "$packagedir/setup.py" ];
then
  echo "$packagedir does not contain a setup.py file"
  exit 1
fi

test -d "build" || mkdir "build"

curdir=`pwd`

cd "$packagedir"
python setup.py install --root=../build --no-compile

cd "$curdir"
