comparison python/build.py @ 95:4a37d6992bd3

movage
author windel
date Mon, 24 Dec 2012 13:24:59 +0100
parents python/apps/build.py@654c5ac4f2c5
children af0d7913677a
comparison
equal deleted inserted replaced
94:1be00bcfaabb 95:4a37d6992bd3
1 import sys, os, argparse
2 sys.path.insert(0, os.path.join('..','libs'))
3
4 # Compiler imports:
5 from compiler import Compiler
6 from project import Project
7
8 if __name__ == '__main__':
9 parser = argparse.ArgumentParser(description='Build tool to build projects')
10 parser.add_argument('project', type=str, help='the project to be build')
11 args = parser.parse_args()
12
13 try:
14 project = Project(args.project)
15 except IOError:
16 print('Failed to load {0}'.format(args.project))
17 sys.exit(3)
18 pc = Compiler()
19 pc.compileProject(project)
20