Bug 1285860 - Add python/mozbuild at beginning of sys.path; r?glandium draft
authorGregory Szorc <gps@mozilla.com>
Mon, 11 Jul 2016 10:42:11 -0700
changeset 386331 66c2beacda4e6d1dea1b7f659702e3428a7b2875
parent 386302 214884d507ee369c1cf14edb26527c4f9a97bf48
child 525086 adfe20094c0b08c4bf9f06f34ea7b73221fc9503
push id22677
push userbmo:gps@mozilla.com
push dateMon, 11 Jul 2016 17:42:21 +0000
reviewersglandium
bugs1285860
milestone50.0a1
Bug 1285860 - Add python/mozbuild at beginning of sys.path; r?glandium We want local source directory paths to take precedence over system paths so system installed packages don't get used. MozReview-Commit-ID: FIZ0RxqZj78
configure.py
--- a/configure.py
+++ b/configure.py
@@ -7,17 +7,17 @@ from __future__ import print_function, u
 import codecs
 import json
 import os
 import subprocess
 import sys
 
 
 base_dir = os.path.abspath(os.path.dirname(__file__))
-sys.path.append(os.path.join(base_dir, 'python', 'mozbuild'))
+sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild'))
 from mozbuild.configure import ConfigureSandbox
 
 
 def main(argv):
     config = {}
     sandbox = ConfigureSandbox(config, os.environ, argv)
     sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure'))