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