diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-10-04 21:19:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-04 21:19:39 +0300 |
commit | 577d6bfdb483452b2a9434ba3a1d7031094b0cbd (patch) | |
tree | 1dac74f6e858db7c896e033062a125ac2048aacd /mesonbuild/mconf.py | |
parent | 019a627f047667ea04574cebb9a174156b2a7a67 (diff) | |
parent | adae6b56de5d8dac7b2eddbb3b9924e440a28fd6 (diff) | |
download | meson-577d6bfdb483452b2a9434ba3a1d7031094b0cbd.zip meson-577d6bfdb483452b2a9434ba3a1d7031094b0cbd.tar.gz meson-577d6bfdb483452b2a9434ba3a1d7031094b0cbd.tar.bz2 |
Merge pull request #4204 from xclaesse/unify-cmd-line
Use a single ArgumentParser for all subcommands
Diffstat (limited to 'mesonbuild/mconf.py')
-rw-r--r-- | mesonbuild/mconf.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py index 2fd69b0..576c574 100644 --- a/mesonbuild/mconf.py +++ b/mesonbuild/mconf.py @@ -13,17 +13,13 @@ # limitations under the License. import os -import argparse from . import (coredata, mesonlib, build) -def buildparser(): - parser = argparse.ArgumentParser(prog='meson configure') +def add_arguments(parser): coredata.register_builtin_arguments(parser) - parser.add_argument('builddir', nargs='?', default='.') parser.add_argument('--clearcache', action='store_true', default=False, help='Clear cached state (e.g. found dependencies)') - return parser class ConfException(mesonlib.MesonException): @@ -149,9 +145,7 @@ class Conf: self.print_options('Testing options', test_options) -def run(args): - args = mesonlib.expand_arguments(args) - options = buildparser().parse_args(args) +def run(options): coredata.parse_cmd_line_options(options) builddir = os.path.abspath(os.path.realpath(options.builddir)) try: |