Mercurial > pymonkey
annotate pavement.py @ 11:551ba05fe6ad
factored out Runtime, Context, and utils into separate files.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 28 Jun 2009 17:28:57 -0700 |
parents | 29eaa1fceff1 |
children | ca17531e8c81 |
rev | line source |
---|---|
0 | 1 import os |
2 import subprocess | |
3 import shutil | |
4 import sys | |
5 | |
6 from paver.easy import * | |
7 | |
8 @task | |
9 def auto(options): | |
10 objdir = os.path.join("..", "mozilla-stuff", "basic-firefox") | |
11 objdir = os.path.abspath(objdir) | |
12 incdir = os.path.join(objdir, "dist", "include") | |
13 libdir = os.path.join(objdir, "dist", "lib") | |
14 | |
15 print "Building extension." | |
16 | |
17 result = subprocess.call( | |
18 ["g++", | |
19 "-framework", "Python", | |
20 "-I%s" % incdir, | |
21 "-L%s" % libdir, | |
22 "-lmozjs", | |
23 "-o", "pymonkey.so", | |
24 "-dynamiclib", | |
10
29eaa1fceff1
Moved definition of undefined type into a separate module.
Atul Varma <varmaa@toolness.com>
parents:
0
diff
changeset
|
25 "pymonkey.c", |
11
551ba05fe6ad
factored out Runtime, Context, and utils into separate files.
Atul Varma <varmaa@toolness.com>
parents:
10
diff
changeset
|
26 "utils.c", |
551ba05fe6ad
factored out Runtime, Context, and utils into separate files.
Atul Varma <varmaa@toolness.com>
parents:
10
diff
changeset
|
27 "undefined.c", |
551ba05fe6ad
factored out Runtime, Context, and utils into separate files.
Atul Varma <varmaa@toolness.com>
parents:
10
diff
changeset
|
28 "context.c", |
551ba05fe6ad
factored out Runtime, Context, and utils into separate files.
Atul Varma <varmaa@toolness.com>
parents:
10
diff
changeset
|
29 "runtime.c"] |
0 | 30 ) |
31 | |
32 if result: | |
33 sys.exit(result) | |
34 | |
35 print "Running test suite." | |
36 | |
37 new_env = {} | |
38 new_env.update(os.environ) | |
39 new_env['DYLD_LIBRARY_PATH'] = libdir | |
40 | |
41 result = subprocess.call( | |
42 [sys.executable, | |
43 "test_pymonkey.py"], | |
44 env = new_env | |
45 ) | |
46 | |
47 if result: | |
48 sys.exit(result) |