source: trunk/anuga_core/compile_all.py

Last change on this file was 9585, checked in by steve, 9 years ago

added in win32 support

File size: 779 bytes
Line 
1import os
2import time
3import sys
4import subprocess
5
6buildroot = os.getcwd()
7t0 = time.time()
8
9#--------------------------------------------------
10# Compiling anuga code
11#--------------------------------------------------
12#os.chdir('source')
13
14#print 'Changing to', os.getcwd()       
15
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 '
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*"-"
28    print
29    msg = 'Compiled anuga successfully.'
30    print msg
31
32print       
33print 'That took %.3fs' %(time.time() - t0)
34
35
36
37
Note: See TracBrowser for help on using the repository browser.