From 289151475534dbb069dfd23d39c425a0d90888b9 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 15 Mar 2016 18:34:30 +0900 Subject: [PATCH] Bug 1257049 - Stop spawning a separate process for config.status from configure.py. r=gps --- configure.py | 5 ++--- python/mozbuild/mozbuild/config_status.py | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.py b/configure.py index f3192caef2e5..35e77d7de885 100644 --- a/configure.py +++ b/configure.py @@ -72,9 +72,8 @@ if __name__ == '__main__': if not config.get('BUILDING_JS') or config.get('JS_STANDALONE'): if not config.get('JS_STANDALONE'): os.environ['WRITE_MOZINFO'] = '1' - # Until we have access to the virtualenv from this script, execute - # config.status externally, with the virtualenv python. - return subprocess.call([config['PYTHON'], 'config.status']) + from mozbuild.config_status import config_status + return config_status(args=[], **sanitized_config) return 0 diff --git a/python/mozbuild/mozbuild/config_status.py b/python/mozbuild/mozbuild/config_status.py index d4921ab8bc09..4d7e5f508505 100644 --- a/python/mozbuild/mozbuild/config_status.py +++ b/python/mozbuild/mozbuild/config_status.py @@ -63,7 +63,8 @@ following: def config_status(topobjdir='.', topsrcdir='.', defines=None, - non_global_defines=None, substs=None, source=None): + non_global_defines=None, substs=None, source=None, + args=sys.argv[1:]): '''Main function, providing config.status functionality. Contrary to config.status, it doesn't use CONFIG_FILES or CONFIG_HEADERS @@ -112,7 +113,7 @@ def config_status(topobjdir='.', topsrcdir='.', defines=None, ' '.join(default_backends)) parser.add_argument('--dry-run', action='store_true', help='do everything except writing files out.') - options = parser.parse_args() + options = parser.parse_args(args) # Without -n, the current directory is meant to be the top object directory if not options.not_topobjdir: