summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2021-10-16 10:51:13 -0400
committerMoonchild <moonchild@palemoon.org>2022-04-01 15:35:04 +0200
commit35e71030933059c0c312ec2dc35c616e31a3af75 (patch)
tree8b91c41578f7ab46d4c814595014d1272fd00a70 /build
parent426a9755d99a9fc818f151d407cbc9bdcd434a5f (diff)
downloaduxp-35e71030933059c0c312ec2dc35c616e31a3af75.tar.gz
No Issue - Remove Mozilla source tree bootstrapping python module
Part of Mozilla's DaaS, "bootstrapping" the tree is heavily dependent on Mozilla infrastructure, m-c structure and dependencies, libs, toolchain, etc. and would never work for us. Sweeping some clutter, in other words. This copies in a function that was imported from mozboot to satisfy deps.
Diffstat (limited to 'build')
-rw-r--r--build/mach_bootstrap.py17
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