1 arta 1.1 #!/usr/bin/env python3
2
3 import sys
4
5 if sys.version_info < (3, 2):
6 raise Exception("You must run the 3.2 release, or a more recent release, of Python.")
7
8 import os
9 from subprocess import check_call, CalledProcessError
10
11 sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.environ['LOCALIZATIONDIR']))
12 from drmsparams import DRMSParams
13
14 if __name__ == "__main__":
15 rv = 0
16 try:
17 # Turn off debug builds.
18 os.environ['JSOC_DEBUG'] = '0'
19
20 # Make sure the JSOCROOT is current directory.
21 os.environ['JSOCROOT'] = os.path.realpath(os.getcwd())
22 arta 1.1
23 try:
24 # make DRMS
25 cmdList = [ '/usr/bin/make' ]
26 check_call(cmdList)
27
28 # make SUMS
29 cmdList = [ '/usr/bin/make', 'sums' ]
30 check_call(cmdList)
31 except CalledProcessError as exc:
32 raise Exception('runMake', 'Unable to build NetDRMS.')
33 except:
34 import traceback
35
36 print(traceback.format_exc(5), file=stderr)
37 rv = 1
38
39 sys.exit(rv)
|