diff --git a/ognibuild/__init__.py b/ognibuild/__init__.py index a9dfcac..b4f0492 100644 --- a/ognibuild/__init__.py +++ b/ognibuild/__init__.py @@ -87,6 +87,22 @@ def run_with_build_fixer(session, args): session.check_call(args) +def run_build(session): + raise NotImplementedError + + +def run_clean(session): + raise NotImplementedError + + +def run_test(session): + raise NotImplementedError + + +def run_install(session): + raise NotImplementedError + + def run_dist(session): # TODO(jelmer): Check $PATH rather than hardcoding? if not os.path.exists('/usr/bin/git'): diff --git a/ognibuild/__main__.py b/ognibuild/__main__.py index d2b5f3a..2571abc 100644 --- a/ognibuild/__main__.py +++ b/ognibuild/__main__.py @@ -17,13 +17,18 @@ import os import sys -from . import run_dist, NoBuildToolsFound, note +from . import ( + run_dist, run_build, run_clean, run_install, run_test, NoBuildToolsFound, + note + ) def main(): import argparse parser = argparse.ArgumentParser() - parser.add_argument('subcommand', type=str, choices=['dist']) + parser.add_argument( + 'subcommand', type=str, + choices=['dist', 'build', 'clean', 'test', 'install']) parser.add_argument( '--directory', '-d', type=str, help='Directory for project.', default='.') @@ -41,6 +46,14 @@ def main(): try: if args.subcommand == 'dist': run_dist(session) + if args.subcommand == 'build': + run_build(session) + if args.subcommand == 'clean': + run_clean(session) + if args.subcommand == 'install': + run_install(session) + if args.subcommand == 'test': + run_test(session) except NoBuildToolsFound: note('No build tools found.') return 1