Bug 696535 - Use absolute paths in pythonpath.py. r=bsmedberg a=test-only
authorJustin Lebar <justin.lebar@gmail.com>
Mon, 12 Dec 2011 15:44:41 -0500
changeset 82457 a05ecb395410818e85aa220f1900fd072967fa6c
parent 82456 6057abf8f4e6f9d4863881298c676cb099a49261
child 82458 202f4ccbbda1da27190358326040bb9d53fec10d
push id21614
push userjlebar@mozilla.com
push dateMon, 12 Dec 2011 21:27:07 +0000
treeherdermozilla-central@a05ecb395410 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, test-only
bugs696535
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 696535 - Use absolute paths in pythonpath.py. r=bsmedberg a=test-only
config/pythonpath.py
js/src/config/pythonpath.py
--- a/config/pythonpath.py
+++ b/config/pythonpath.py
@@ -18,28 +18,28 @@ def main(args):
 
         if arg == '-I':
             args.pop(0)
             try:
                 path = args.pop(0)
             except IndexError:
                 usage()
 
-            paths.append(path)
+            paths.append(os.path.abspath(path))
             continue
 
         if arg.startswith('-I'):
-            paths.append(args.pop(0)[2:])
+            paths.append(os.path.abspath(args.pop(0)[2:]))
             continue
 
         break
 
     script = args[0]
 
-    sys.path[0:0] = [os.path.dirname(script)] + paths
+    sys.path[0:0] = [os.path.abspath(os.path.dirname(script))] + paths
     sys.argv = args
     sys.argc = len(args)
 
     frozenglobals['__name__'] = '__main__'
     frozenglobals['__file__'] = script
 
     execfile(script, frozenglobals)
 
--- a/js/src/config/pythonpath.py
+++ b/js/src/config/pythonpath.py
@@ -18,28 +18,28 @@ def main(args):
 
         if arg == '-I':
             args.pop(0)
             try:
                 path = args.pop(0)
             except IndexError:
                 usage()
 
-            paths.append(path)
+            paths.append(os.path.abspath(path))
             continue
 
         if arg.startswith('-I'):
-            paths.append(args.pop(0)[2:])
+            paths.append(os.path.abspath(args.pop(0)[2:]))
             continue
 
         break
 
     script = args[0]
 
-    sys.path[0:0] = [os.path.dirname(script)] + paths
+    sys.path[0:0] = [os.path.abspath(os.path.dirname(script))] + paths
     sys.argv = args
     sys.argc = len(args)
 
     frozenglobals['__name__'] = '__main__'
     frozenglobals['__file__'] = script
 
     execfile(script, frozenglobals)