Mercurial > pymonkey
annotate setup.py @ 122:5eda03c8e756
context.evaluate_script() can now take unicode code strings.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Wed, 19 Aug 2009 00:47:46 -0700 |
parents | edce6af83ee2 |
children | b4e216d06e83 |
rev | line source |
---|---|
25
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
1 #! /usr/bin/env python |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
2 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
3 import os |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
4 import sys |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
5 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
6 if __name__ == '__main__': |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
7 # This code is run if we're executed directly from the command-line. |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
8 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
9 myfile = os.path.abspath(__file__) |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
10 mydir = os.path.dirname(myfile) |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
11 sys.path.insert(0, os.path.join(mydir, 'python-modules')) |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
12 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
13 args = sys.argv[1:] |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
14 if not args: |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
15 args = ['help'] |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
16 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
17 # Have paver run this very file as its pavement script. |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
18 args = ['-f', myfile] + args |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
19 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
20 import paver.tasks |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
21 paver.tasks.main(args) |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
22 sys.exit(0) |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
23 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
24 # This code is run if we're executed as a pavement script by paver. |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
25 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
26 import subprocess |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
27 import shutil |
109
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
28 import errno |
49
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
29 import webbrowser |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
30 import urllib |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
31 import urllib2 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
32 import StringIO |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
33 import tarfile |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
34 import distutils.dir_util |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
35 import distutils.core |
25
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
36 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
37 from paver.easy import * |
101
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
38 from paver.setuputils import setup |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
39 |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
40 SOURCE_FILES = ['pymonkey.cpp', |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
41 'utils.cpp', |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
42 'object.cpp', |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
43 'function.cpp', |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
44 'undefined.cpp', |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
45 'context.cpp', |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
46 'runtime.cpp'] |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
47 |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
48 SPIDERMONKEY_TAG = "1.8.1pre" |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
49 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
50 SPIDERMONKEY_SRC_URL = ("http://hg.toolness.com/spidermonkey/archive/" |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
51 "%s.tar.bz2" % SPIDERMONKEY_TAG) |
101
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
52 |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
53 SPIDERMONKEY_DIR = os.path.abspath('spidermonkey-%s' % SPIDERMONKEY_TAG) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
54 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
55 BUILD_DIR = os.path.abspath('build') |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
56 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
57 SPIDERMONKEY_OBJDIR = os.path.join(BUILD_DIR, 'spidermonkey') |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
58 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
59 SPIDERMONKEY_MAKEFILE = os.path.join(SPIDERMONKEY_OBJDIR, 'Makefile') |
101
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
60 |
106
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
61 DOCTEST_OUTPUT_DIR = os.path.join(BUILD_DIR, 'doctest_output') |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
62 |
103
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
63 setup_options = dict( |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
64 name='pymonkey', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
65 version='0.0.1', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
66 description='Access SpiderMonkey from Python', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
67 author='Atul Varma', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
68 author_email='atul@mozilla.com', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
69 url='http://www.toolness.com' |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
70 ) |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
71 |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
72 ext_options = dict( |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
73 include_dirs = [os.path.join(SPIDERMONKEY_OBJDIR, 'dist', 'include')], |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
74 library_dirs = [SPIDERMONKEY_OBJDIR] |
103
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
75 ) |
101
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
76 |
103
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
77 if sys.platform == 'win32': |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
78 # MSVC can't find the js_static.lib SpiderMonkey library, even though |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
79 # it exists and distutils is trying to tell it to link to it, so |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
80 # we'll just link to the DLL on Windows platforms and install |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
81 # it in a place where Windows can find it at runtime. |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
82 ext_options['libraries'] = ['js3250'] |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
83 ext_options['define_macros'] = [('XP_WIN', 1)] |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
84 # TODO: This is almost certainly not the ideal way to distribute |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
85 # a DLL used by a C extension module. |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
86 setup_options['data_files'] = [ |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
87 ('Lib\\site-packages', [os.path.join(SPIDERMONKEY_OBJDIR, |
103
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
88 'js3250.dll')]) |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
89 ] |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
90 else: |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
91 ext_options['libraries'] = ['js_static'] |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
92 |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
93 setup_options['ext_modules'] = [ |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
94 distutils.core.Extension('pymonkey', |
117
ac8ca0ee7760
Moved all .cpp/.h files into 'src' dir and test suite into 'tests' dir.
Atul Varma <varmaa@toolness.com>
parents:
109
diff
changeset
|
95 [os.path.join("src", filename) |
ac8ca0ee7760
Moved all .cpp/.h files into 'src' dir and test suite into 'tests' dir.
Atul Varma <varmaa@toolness.com>
parents:
109
diff
changeset
|
96 for filename in SOURCE_FILES], |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
97 **ext_options) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
98 ] |
103
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
99 |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
100 setup(**setup_options) |
25
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
101 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
102 @task |
49
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
103 def docs(options): |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
104 """Open the Pymonkey documentation in your web browser.""" |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
105 |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
106 url = os.path.abspath(os.path.join("docs", "rendered", "index.html")) |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
107 url = urllib.pathname2url(url) |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
108 webbrowser.open(url) |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
109 |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
110 @task |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
111 def build_spidermonkey(options): |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
112 """Fetch and build SpiderMonkey.""" |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
113 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
114 if not os.path.exists(SPIDERMONKEY_DIR): |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
115 print("SpiderMonkey source directory not found, " |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
116 "fetching from %s." % SPIDERMONKEY_SRC_URL) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
117 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
118 urlfile = urllib2.urlopen(SPIDERMONKEY_SRC_URL) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
119 output = StringIO.StringIO() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
120 done = False |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
121 while not done: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
122 stuff = urlfile.read(65536) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
123 if stuff: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
124 output.write(stuff) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
125 sys.stdout.write(".") |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
126 sys.stdout.flush() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
127 else: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
128 done = True |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
129 sys.stdout.write("\n") |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
130 urlfile.close() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
131 output.seek(0) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
132 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
133 print "Extracting files." |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
134 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
135 tar = tarfile.open("", fileobj = output, mode = "r:bz2") |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
136 tar.extractall() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
137 output.close() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
138 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
139 distutils.dir_util.mkpath(SPIDERMONKEY_OBJDIR) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
140 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
141 if not os.path.exists(SPIDERMONKEY_MAKEFILE): |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
142 print "Running configure." |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
143 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
144 configure = os.path.join(SPIDERMONKEY_DIR, "js", "src", |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
145 "configure") |
108
7f3a91323a88
If 'setup.py build --debug' is run and a spidermonkey build doesn't exist, then spidermonkey is built with debugging enabled.
Atul Varma <varmaa@toolness.com>
parents:
107
diff
changeset
|
146 cmdline = [configure, |
7f3a91323a88
If 'setup.py build --debug' is run and a spidermonkey build doesn't exist, then spidermonkey is built with debugging enabled.
Atul Varma <varmaa@toolness.com>
parents:
107
diff
changeset
|
147 "--enable-static", |
7f3a91323a88
If 'setup.py build --debug' is run and a spidermonkey build doesn't exist, then spidermonkey is built with debugging enabled.
Atul Varma <varmaa@toolness.com>
parents:
107
diff
changeset
|
148 "--disable-tests"] |
7f3a91323a88
If 'setup.py build --debug' is run and a spidermonkey build doesn't exist, then spidermonkey is built with debugging enabled.
Atul Varma <varmaa@toolness.com>
parents:
107
diff
changeset
|
149 if options.get("build") and options.build.get("debug"): |
7f3a91323a88
If 'setup.py build --debug' is run and a spidermonkey build doesn't exist, then spidermonkey is built with debugging enabled.
Atul Varma <varmaa@toolness.com>
parents:
107
diff
changeset
|
150 cmdline.extend(["--enable-debug", |
7f3a91323a88
If 'setup.py build --debug' is run and a spidermonkey build doesn't exist, then spidermonkey is built with debugging enabled.
Atul Varma <varmaa@toolness.com>
parents:
107
diff
changeset
|
151 "--enable-gczeal"]) |
7f3a91323a88
If 'setup.py build --debug' is run and a spidermonkey build doesn't exist, then spidermonkey is built with debugging enabled.
Atul Varma <varmaa@toolness.com>
parents:
107
diff
changeset
|
152 retval = subprocess.call(cmdline, |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
153 cwd = SPIDERMONKEY_OBJDIR) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
154 if retval: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
155 sys.exit(retval) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
156 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
157 print "Running make." |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
158 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
159 retval = subprocess.call(["make"], cwd = SPIDERMONKEY_OBJDIR) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
160 if retval: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
161 sys.exit(retval) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
162 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
163 @task |
106
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
164 @needs('build_spidermonkey', 'setuptools.command.build') |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
165 def build(options): |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
166 """Builds the pymonkey extension.""" |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
167 |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
168 pass |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
169 |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
170 @task |
49
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
171 def build_docs(options): |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
172 """Build the Pymonkey documentation (requires Sphinx).""" |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
173 |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
174 retval = subprocess.call(["sphinx-build", |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
175 "-b", "html", |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
176 os.path.join("docs", "src"), |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
177 os.path.join("docs", "rendered")]) |
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
178 if retval: |
51
fabd3f2271fa
Added some basic, incomplete docs on the pymonkey module, which include a doctest that's run when pymonkey is built.
Atul Varma <varmaa@toolness.com>
parents:
49
diff
changeset
|
179 sys.exit(retval) |
49
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
180 |
107 | 181 def maybe_clean(dirname, only_if_empty = False): |
182 if os.path.exists(dirname): | |
183 if not (only_if_empty and os.listdir(dirname)): | |
184 distutils.dir_util.remove_tree(dirname) | |
185 | |
186 @task | |
187 @needs('setuptools.command.clean') | |
188 def clean(options): | |
189 """Clean up intermediate files, and optionally other files too.""" | |
190 | |
191 maybe_clean(DOCTEST_OUTPUT_DIR) | |
192 | |
193 if options.clean.get("all"): | |
194 maybe_clean(SPIDERMONKEY_OBJDIR) | |
195 | |
196 maybe_clean(BUILD_DIR, only_if_empty = True) | |
197 | |
106
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
198 def get_lib_dir(): |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
199 # This is really weird and hacky; it ought to be much easier |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
200 # to figure out the default directory that distutils builds |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
201 # its C extension modules in. |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
202 return [os.path.join(BUILD_DIR, name) |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
203 for name in os.listdir(BUILD_DIR) |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
204 if name.startswith("lib.")][0] |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
205 |
49
7401af070bb8
Moved README to Sphinx documentation. Keeping the rendered docs in the repository so that they can be viewed via HG and locally by people who don't have Sphinx installed.
Atul Varma <varmaa@toolness.com>
parents:
37
diff
changeset
|
206 @task |
101
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
207 def test(options): |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
208 """Test the Pymonkey Python C extension.""" |
25
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
209 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
210 print "Running test suite." |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
211 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
212 new_env = {} |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
213 new_env.update(os.environ) |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
214 |
106
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
215 def append_path(env_var, path): |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
216 paths = new_env.get(env_var, '').split(os.path.pathsep) |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
217 paths.append(path) |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
218 new_env[env_var] = os.path.pathsep.join(paths) |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
219 |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
220 # We have to add our build directory to the python path so that |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
221 # our tests can find the pymonkey module. |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
222 append_path('PYTHONPATH', get_lib_dir()) |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
223 |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
224 if sys.platform == 'win32': |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
225 # If we're on Windows, ensure that the SpiderMonkey DLL |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
226 # can be loaded. |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
227 append_path('PATH', SPIDERMONKEY_OBJDIR) |
1e6523de9df1
Fixed docs to represent the much-simplified build process, fixed the test target to work w/ default build options, moved doctest output dir into build dir.
Atul Varma <varmaa@toolness.com>
parents:
105
diff
changeset
|
228 |
25
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
229 result = subprocess.call( |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
230 [sys.executable, |
117
ac8ca0ee7760
Moved all .cpp/.h files into 'src' dir and test suite into 'tests' dir.
Atul Varma <varmaa@toolness.com>
parents:
109
diff
changeset
|
231 os.path.join("tests", "test_pymonkey.py")], |
25
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
232 env = new_env |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
233 ) |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
234 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
235 if result: |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
236 sys.exit(result) |
51
fabd3f2271fa
Added some basic, incomplete docs on the pymonkey module, which include a doctest that's run when pymonkey is built.
Atul Varma <varmaa@toolness.com>
parents:
49
diff
changeset
|
237 |
fabd3f2271fa
Added some basic, incomplete docs on the pymonkey module, which include a doctest that's run when pymonkey is built.
Atul Varma <varmaa@toolness.com>
parents:
49
diff
changeset
|
238 print "Running doctests." |
fabd3f2271fa
Added some basic, incomplete docs on the pymonkey module, which include a doctest that's run when pymonkey is built.
Atul Varma <varmaa@toolness.com>
parents:
49
diff
changeset
|
239 |
109
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
240 try: |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
241 retval = subprocess.call(["sphinx-build", |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
242 "-b", "doctest", |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
243 os.path.join("docs", "src"), |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
244 DOCTEST_OUTPUT_DIR], |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
245 env = new_env) |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
246 except OSError, e: |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
247 if e.errno == errno.ENOENT: |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
248 print "Sphinx not found, skipping doctests." |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
249 retval = 0 |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
250 else: |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
251 raise |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
252 |
51
fabd3f2271fa
Added some basic, incomplete docs on the pymonkey module, which include a doctest that's run when pymonkey is built.
Atul Varma <varmaa@toolness.com>
parents:
49
diff
changeset
|
253 if retval: |
fabd3f2271fa
Added some basic, incomplete docs on the pymonkey module, which include a doctest that's run when pymonkey is built.
Atul Varma <varmaa@toolness.com>
parents:
49
diff
changeset
|
254 sys.exit(retval) |