#!/usr/bin/python

from __future__ import with_statement

import os
__file__=os.path.realpath(__file__)
import site
{{if sitedir}}
site.addsitedir('{{sitedir}}')
{{endif}}
site.addsitedir(os.path.dirname(__file__))

__requires__ = '{{project}}'
import pkg_resources
pkg_resources.require('{{project}}')

import {{package}}

import sys

if __name__ == '__main__':
    # Load the WSGI application from the config file
    from paste.deploy import loadapp
    wsgi_app = loadapp('config:'+os.path.dirname(__file__)+'/development.ini')

from bazsql import model

# We don't use bazbase.db because we don't actually want this to go through
# to bazsvn.  In other words, don't do this postinstall.
model.session.begin()
model.clear()
model.session.commit()
model.session.close()
