diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-06-21 00:53:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-21 00:53:54 +0300 |
commit | f3c01a3c4f973ad234ead327f696b5e7fb43e4f6 (patch) | |
tree | dbf6793f698831d570396254edb57a85e8669e1d /mesonbuild/mesonmain.py | |
parent | 57b3f9858625b1c0204320dddec8b6b84f6289c2 (diff) | |
parent | c6431fe47e93f2d9dabeb4890842fd45ee983c56 (diff) | |
download | meson-f3c01a3c4f973ad234ead327f696b5e7fb43e4f6.zip meson-f3c01a3c4f973ad234ead327f696b5e7fb43e4f6.tar.gz meson-f3c01a3c4f973ad234ead327f696b5e7fb43e4f6.tar.bz2 |
Merge pull request #3590 from mesonbuild/testcommand
Made install a top level Meson command.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index e74fb36..a4406be 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -20,11 +20,10 @@ import cProfile as profile from . import environment, interpreter, mesonlib from . import build -from . import mconf, mintro, mtest, rewriter, minit from . import mlog, coredata from .mesonlib import MesonException from .environment import detect_msys2_arch -from .wrap import WrapMode, wraptool +from .wrap import WrapMode default_warning = '1' @@ -178,9 +177,6 @@ def run_script_command(args): elif cmdname == 'cleantrees': import mesonbuild.scripts.cleantrees as abc cmdfunc = abc.run - elif cmdname == 'install': - import mesonbuild.scripts.meson_install as abc - cmdfunc = abc.run elif cmdname == 'commandrunner': import mesonbuild.scripts.commandrunner as abc cmdfunc = abc.run @@ -270,23 +266,32 @@ def run(original_args, mainfile): args = remaining_args cmd_name = args[0] if cmd_name == 'test': + from . import mtest return mtest.run(remaining_args) elif cmd_name == 'setup': args = remaining_args # FALLTHROUGH like it's 1972. + elif cmd_name == 'install': + from . import minstall + return minstall.run(remaining_args) elif cmd_name == 'introspect': + from . import mintro return mintro.run(remaining_args) elif cmd_name == 'rewrite': + from . import rewriter return rewriter.run(remaining_args) elif cmd_name == 'configure': try: + from . import mconf return mconf.run(remaining_args) except MesonException as e: mlog.exception(e) sys.exit(1) elif cmd_name == 'wrap': + from .wrap import wraptool return wraptool.run(remaining_args) elif cmd_name == 'init': + from . import minit return minit.run(remaining_args) elif cmd_name == 'runpython': import runpy |