This commit is contained in:
Kovid Goyal 2016-11-11 22:11:40 +05:30
parent 1ad4d52659
commit d28c7fee68

View File

@ -79,16 +79,20 @@ def option_parser():
return p return p
def find_c_files():
d = os.path.join(base, 'kitty')
for x in os.listdir(d):
if x.endswith('.c'):
yield os.path.join(d, x)
def main(): def main():
if sys.version_info < (3, 5): if sys.version_info < (3, 5):
raise SystemExit('python >= 3.5 required') raise SystemExit('python >= 3.5 required')
args = option_parser().parse_args() args = option_parser().parse_args()
init_env(args.debug) init_env(args.debug)
if args.action == 'build': if args.action == 'build':
compile_c_extension( compile_c_extension(*find_c_files())
'kitty/fast_data_types', 'kitty/line.c', 'kitty/data-types.c',
'kitty/line-buf.c', 'kitty/cursor.c', 'kitty/colors.c',
'kitty/sprites.c', 'kitty/tracker.c')
elif args.action == 'test': elif args.action == 'test':
os.execlp(sys.executable, sys.executable, os.path.join(base, 'test.py')) os.execlp(sys.executable, sys.executable, os.path.join(base, 'test.py'))