forked from GeoscienceAustralia/anuga_core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile_all.py
More file actions
37 lines (28 loc) · 779 Bytes
/
compile_all.py
File metadata and controls
37 lines (28 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import os
import time
import sys
import subprocess
buildroot = os.getcwd()
t0 = time.time()
#--------------------------------------------------
# Compiling anuga code
#--------------------------------------------------
#os.chdir('source')
#print 'Changing to', os.getcwd()
if sys.platform == 'win32':
cmd = 'python setup.py build --compiler=mingw32 install --install-lib=source '
else:
cmd = 'python setup.py install --install-lib=source '
print cmd
err = os.system(cmd)
if err != 0:
msg = 'Could not compile anuga '
msg += 'on platform %s, %s\n' % (sys.platform, os.name)
raise Exception, msg
else:
print 50*"-"
print
msg = 'Compiled anuga successfully.'
print msg
print
print 'That took %.3fs' %(time.time() - t0)