11#!/usr/bin/python
2- # Copyright Bruno da Silva de Oliveira 2003. Use, modification and
2+ # Copyright Bruno da Silva de Oliveira 2003. Use, modification and
33# distribution is subject to the Boost Software License, Version 1.0.
4- # (See accompanying file LICENSE_1_0.txt or copy at
4+ # (See accompanying file LICENSE_1_0.txt or copy at
55# http:#www.boost.org/LICENSE_1_0.txt)
66
77import os
1414# win32 configuration
1515#=============================================================================
1616if sys .platform == 'win32' :
17-
17+
1818 includes = '-ID:/programming/libraries/boost-cvs/boost -ID:/Bin/Python/include'
1919 build_pyste_cmd = 'python ../src/Pyste/pyste.py --cache-dir=cache %s ' % includes
2020 compile_single_cmd = 'cl /nologo /GR /GX -c %s -I. ' % includes
2121 link_single_cmd = 'link /nologo /DLL ' \
2222 '/libpath:D:/programming/libraries/boost-cvs/lib /libpath:D:/Bin/Python/libs ' \
23- 'boost_python.lib python23 .lib /out:_%s.dll '
23+ 'boost_python.lib python24 .lib /out:_%s.dll '
2424 obj_ext = 'obj'
25-
25+
2626#=============================================================================
2727# linux configuration
28- #=============================================================================
28+ #=============================================================================
2929elif sys .platform == 'linux2' :
30-
30+
3131 build_pyste_cmd = 'python ../src/Pyste/pyste.py -I. '
3232 compile_single_cmd = 'g++ -shared -c -I. -I/usr/include/python2.2 '
3333 link_single_cmd = 'g++ -shared -o _%s.so -lboost_python '
3434 obj_ext = 'o'
3535
36-
3736
38- def build_pyste (multiple , module ):
37+
38+ def build_pyste (multiple , module ):
3939 rest = '%s --module=_%s %s.pyste' % (multiple , module , module )
4040 execute (build_pyste_cmd + rest )
4141
@@ -67,8 +67,8 @@ def basename(name):
6767
6868def execute (cmd ):
6969 os .system (cmd )
70-
71-
70+
71+
7272def run_tests ():
7373 if os .system ('python runtests.py' ) != 0 :
7474 raise RuntimeError , 'tests failed'
@@ -93,36 +93,36 @@ def cleanup():
9393 shutil .rmtree ('_' + module )
9494 except OSError : pass
9595
96-
96+
9797def main (multiple , module = None ):
9898 if module is None :
9999 modules = get_modules ()
100100 else :
101101 modules = [module ]
102-
102+
103103 start = time .clock ()
104- for module in modules :
105- build_pyste (multiple , module )
104+ for module in modules :
105+ build_pyste (multiple , module )
106106 print '-' * 50
107107 print 'Building pyste files: %0.2f seconds' % (time .clock ()- start )
108108 print
109-
109+
110110 start = time .clock ()
111111 for module in modules :
112112 if multiple :
113113 compile_multiple (module )
114114 else :
115- compile_single (module )
115+ compile_single (module )
116116 print '-' * 50
117- print 'Compiling files: %0.2f seconds' % (time .clock ()- start )
117+ print 'Compiling files: %0.2f seconds' % (time .clock ()- start )
118118 print
119119 if len (modules ) == 1 :
120120 os .system ('python %sUT.py' % modules [0 ])
121121 else :
122122 run_tests ()
123- #cleanup()
123+ #cleanup()
124+
124125
125-
126126def get_modules ():
127127 def getname (file ):
128128 return os .path .splitext (os .path .basename (file ))[0 ]
@@ -137,4 +137,4 @@ def getname(file):
137137# main('--multiple', module)
138138 main ('' , module )
139139 except RuntimeError , e :
140- print e
140+ print e
0 commit comments