Mercurial > pymonkey
view pavement.py @ 0:21aa6e3abb49
Origination.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 28 Jun 2009 12:02:22 -0700 |
parents | |
children | 29eaa1fceff1 |
line wrap: on
line source
import os import subprocess import shutil import sys from paver.easy import * @task def auto(options): objdir = os.path.join("..", "mozilla-stuff", "basic-firefox") objdir = os.path.abspath(objdir) incdir = os.path.join(objdir, "dist", "include") libdir = os.path.join(objdir, "dist", "lib") print "Building extension." result = subprocess.call( ["g++", "-framework", "Python", "-I%s" % incdir, "-L%s" % libdir, "-lmozjs", "-o", "pymonkey.so", "-dynamiclib", "pymonkey.c"] ) if result: sys.exit(result) print "Running test suite." new_env = {} new_env.update(os.environ) new_env['DYLD_LIBRARY_PATH'] = libdir result = subprocess.call( [sys.executable, "test_pymonkey.py"], env = new_env ) if result: sys.exit(result)