source:
trunk/anuga_core/compile_all.py
@
9636
Last change on this file since 9636 was 9585, checked in by , 10 years ago | |
---|---|
File size: 779 bytes |
Rev | Line | |
---|---|---|
[2778] | 1 | import os |
[5969] | 2 | import time |
[8690] | 3 | import sys |
4 | import subprocess | |
[2778] | 5 | |
6 | buildroot = os.getcwd() | |
[9567] | 7 | t0 = 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] | 16 | if sys.platform == 'win32': |
17 | cmd = 'python setup.py build --compiler=mingw32 install --install-lib=source ' | |
18 | else: | |
19 | cmd = 'python setup.py install --install-lib=source ' | |
[9567] | 20 | print cmd |
21 | err = os.system(cmd) | |
22 | if err != 0: | |
23 | msg = 'Could not compile anuga ' | |
24 | msg += 'on platform %s, %s\n' % (sys.platform, os.name) | |
25 | raise Exception, msg | |
26 | else: | |
27 | print 50*"-" | |
[9503] | 28 | |
[9567] | 29 | msg = 'Compiled anuga successfully.' |
30 | print msg | |
[7455] | 31 | |
[7457] | 32 | |
[5969] | 33 | print 'That took %.3fs' %(time.time() - t0) |
[6417] | 34 | |
[8512] | 35 | |
36 | ||
[8766] | 37 |
Note: See TracBrowser
for help on using the repository browser.