source: trunk/anuga_core/compile_all.py @ 9636

Last change on this file since 9636 was 9585, checked in by steve, 10 years ago

added in win32 support

File size: 779 bytes
RevLine 
[2778]1import os
[5969]2import time
[8690]3import sys
4import subprocess
[2778]5
6buildroot = os.getcwd()
[9567]7t0 = time.time()
[2778]8
[9085]9#--------------------------------------------------
[9362]10# Compiling anuga code
[9085]11#--------------------------------------------------
[9584]12#os.chdir('source')
[3514]13
[9584]14#print 'Changing to', os.getcwd()       
[2778]15
[9585]16if sys.platform == 'win32':
17    cmd = 'python setup.py build --compiler=mingw32  install --install-lib=source '
18else:
19    cmd = 'python setup.py install --install-lib=source '
[9567]20print cmd
21err = os.system(cmd)
22if err != 0:
23    msg = 'Could not compile anuga '
24    msg += 'on platform %s, %s\n' % (sys.platform, os.name)
25    raise Exception, msg
26else:
27    print 50*"-"
[9503]28    print
[9567]29    msg = 'Compiled anuga successfully.'
30    print msg
[7455]31
[7457]32print       
[5969]33print 'That took %.3fs' %(time.time() - t0)
[6417]34
[8512]35
36
[8766]37
Note: See TracBrowser for help on using the repository browser.