Mercurial > pymonkey
annotate pavement.py @ 13:ca17531e8c81
Added an object class.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 28 Jun 2009 18:19:14 -0700 |
parents | 551ba05fe6ad |
children |
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", |
13 | 27 "object.c", |
11
551ba05fe6ad
factored out Runtime, Context, and utils into separate files.
Atul Varma <varmaa@toolness.com>
parents:
10
diff
changeset
|
28 "undefined.c", |
551ba05fe6ad
factored out Runtime, Context, and utils into separate files.
Atul Varma <varmaa@toolness.com>
parents:
10
diff
changeset
|
29 "context.c", |
551ba05fe6ad
factored out Runtime, Context, and utils into separate files.
Atul Varma <varmaa@toolness.com>
parents:
10
diff
changeset
|
30 "runtime.c"] |
0 | 31 ) |
32 | |
33 if result: | |
34 sys.exit(result) | |
35 | |
36 print "Running test suite." | |
37 | |
38 new_env = {} | |
39 new_env.update(os.environ) | |
40 new_env['DYLD_LIBRARY_PATH'] = libdir | |
41 | |
42 result = subprocess.call( | |
43 [sys.executable, | |
44 "test_pymonkey.py"], | |
45 env = new_env | |
46 ) | |
47 | |
48 if result: | |
49 sys.exit(result) |