diff options
Diffstat (limited to 'build/mach_bootstrap.py')
-rw-r--r-- | build/mach_bootstrap.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/build/mach_bootstrap.py b/build/mach_bootstrap.py index 9ff3ff89af..ace8d0c4ef 100644 --- a/build/mach_bootstrap.py +++ b/build/mach_bootstrap.py @@ -35,7 +35,6 @@ Press ENTER/RETURN to continue or CTRL+c to abort. # TODO Bug 794506 Integrate with the in-tree virtualenv configuration. SEARCH_PATHS = [ 'python/mach', - 'python/mozboot', 'python/mozbuild', 'python/mozlint', 'python/mozversioncontrol', @@ -105,7 +104,6 @@ MACH_MODULES = [ 'python/mach/mach/commands/commandinfo.py', 'python/mach/mach/commands/settings.py', 'python/compare-locales/mach_commands.py', - 'python/mozboot/mozboot/mach_commands.py', 'python/mozbuild/mozbuild/mach_commands.py', 'python/mozbuild/mozbuild/backend/mach_commands.py', 'python/mozbuild/mozbuild/compilation/codecomplete.py', @@ -198,7 +196,20 @@ def bootstrap(topsrcdir, mozilla_dir=None): # like surprises. sys.path[0:0] = [os.path.join(mozilla_dir, path) for path in SEARCH_PATHS] import mach.main - from mozboot.util import get_state_dir + + def get_state_dir(): + """Obtain path to a directory to hold state. + + Returns a tuple of the path and a bool indicating whether the + value came from an environment variable. + """ + state_user_dir = os.path.expanduser('~/.mozbuild') + state_env_dir = os.environ.get('MOZBUILD_STATE_PATH') + + if state_env_dir: + return state_env_dir, True + else: + return state_user_dir, False def telemetry_handler(context, data): # We have not opted-in to telemetry |