Mercurial > pymonkey
annotate setup.py @ 141:96dc1beefc00
Regenerated docs.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Mon, 24 Aug 2009 21:54:20 -0700 |
parents | b4e216d06e83 |
children | dd32a92f6b4f |
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', |
136
b4e216d06e83
Added pymonkey.Script, which wraps a JSScript object, and context.compile_script()/execute_script().
Atul Varma <varmaa@toolness.com>
parents:
121
diff
changeset
|
44 'script.cpp', |
101
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
45 'undefined.cpp', |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
46 'context.cpp', |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
47 'runtime.cpp'] |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
48 |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
49 SPIDERMONKEY_TAG = "1.8.1pre" |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
50 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
51 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
|
52 "%s.tar.bz2" % SPIDERMONKEY_TAG) |
101
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
53 |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
54 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
|
55 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
56 BUILD_DIR = os.path.abspath('build') |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
57 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
58 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
|
59 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
60 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
|
61 |
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
|
62 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
|
63 |
103
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
64 setup_options = dict( |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
65 name='pymonkey', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
66 version='0.0.1', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
67 description='Access SpiderMonkey from Python', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
68 author='Atul Varma', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
69 author_email='atul@mozilla.com', |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
70 url='http://www.toolness.com' |
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 |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
73 ext_options = dict( |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
74 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
|
75 library_dirs = [SPIDERMONKEY_OBJDIR] |
103
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
76 ) |
101
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
77 |
103
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
78 if sys.platform == 'win32': |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
79 # 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
|
80 # 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
|
81 # 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
|
82 # 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
|
83 ext_options['libraries'] = ['js3250'] |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
84 ext_options['define_macros'] = [('XP_WIN', 1)] |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
85 # 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
|
86 # 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
|
87 setup_options['data_files'] = [ |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
88 ('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
|
89 'js3250.dll')]) |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
90 ] |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
91 else: |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
92 ext_options['libraries'] = ['js_static'] |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
93 |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
94 setup_options['ext_modules'] = [ |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
95 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
|
96 [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
|
97 for filename in SOURCE_FILES], |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
98 **ext_options) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
99 ] |
103
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
100 |
257de12e58c4
Added windows build support to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
102
diff
changeset
|
101 setup(**setup_options) |
25
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
102 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
103 @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
|
104 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
|
105 """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
|
106 |
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 = 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
|
108 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
|
109 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
|
110 |
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
|
111 @task |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
112 def build_spidermonkey(options): |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
113 """Fetch and build SpiderMonkey.""" |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
114 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
115 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
|
116 print("SpiderMonkey source directory not found, " |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
117 "fetching from %s." % SPIDERMONKEY_SRC_URL) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
118 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
119 urlfile = urllib2.urlopen(SPIDERMONKEY_SRC_URL) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
120 output = StringIO.StringIO() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
121 done = False |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
122 while not done: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
123 stuff = urlfile.read(65536) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
124 if stuff: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
125 output.write(stuff) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
126 sys.stdout.write(".") |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
127 sys.stdout.flush() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
128 else: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
129 done = True |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
130 sys.stdout.write("\n") |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
131 urlfile.close() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
132 output.seek(0) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
133 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
134 print "Extracting files." |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
135 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
136 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
|
137 tar.extractall() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
138 output.close() |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
139 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
140 distutils.dir_util.mkpath(SPIDERMONKEY_OBJDIR) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
141 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
142 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
|
143 print "Running configure." |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
144 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
145 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
|
146 "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
|
147 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
|
148 "--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
|
149 "--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
|
150 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
|
151 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
|
152 "--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
|
153 retval = subprocess.call(cmdline, |
105
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
154 cwd = SPIDERMONKEY_OBJDIR) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
155 if retval: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
156 sys.exit(retval) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
157 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
158 print "Running make." |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
159 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
160 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
|
161 if retval: |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
162 sys.exit(retval) |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
163 |
9d4cd0803df5
Added a 'build_spidermonkey' target to setup.py.
Atul Varma <varmaa@toolness.com>
parents:
103
diff
changeset
|
164 @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
|
165 @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
|
166 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
|
167 """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
|
168 |
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 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
|
170 |
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
|
171 @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
|
172 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
|
173 """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
|
174 |
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 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
|
176 "-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
|
177 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
|
178 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
|
179 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
|
180 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
|
181 |
107 | 182 def maybe_clean(dirname, only_if_empty = False): |
183 if os.path.exists(dirname): | |
184 if not (only_if_empty and os.listdir(dirname)): | |
185 distutils.dir_util.remove_tree(dirname) | |
186 | |
187 @task | |
188 @needs('setuptools.command.clean') | |
189 def clean(options): | |
190 """Clean up intermediate files, and optionally other files too.""" | |
191 | |
192 maybe_clean(DOCTEST_OUTPUT_DIR) | |
193 | |
194 if options.clean.get("all"): | |
195 maybe_clean(SPIDERMONKEY_OBJDIR) | |
196 | |
197 maybe_clean(BUILD_DIR, only_if_empty = True) | |
198 | |
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
|
199 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
|
200 # 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
|
201 # 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
|
202 # 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
|
203 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
|
204 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
|
205 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
|
206 |
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
|
207 @task |
101
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
208 def test(options): |
ca94f99ad55d
Merged setup.py into manage.py.
Atul Varma <varmaa@toolness.com>
parents:
96
diff
changeset
|
209 """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
|
210 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
211 print "Running test suite." |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
212 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
213 new_env = {} |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
214 new_env.update(os.environ) |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
215 |
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
|
216 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
|
217 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
|
218 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
|
219 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
|
220 |
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 # 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
|
222 # 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
|
223 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
|
224 |
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 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
|
226 # 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
|
227 # 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
|
228 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
|
229 |
25
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
230 result = subprocess.call( |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
231 [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
|
232 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
|
233 env = new_env |
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 |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
236 if result: |
3c2151124cee
Converted pavement.py to manage.py and added a README.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
237 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
|
238 |
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 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
|
240 |
109
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
241 try: |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
242 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
|
243 "-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
|
244 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
|
245 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
|
246 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
|
247 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
|
248 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
|
249 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
|
250 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
|
251 else: |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
252 raise |
204cac15c06a
If sphinx isn't available, doctests aren't run (but unit tests are).
Atul Varma <varmaa@toolness.com>
parents:
108
diff
changeset
|
253 |
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
|
254 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
|
255 sys.exit(retval) |