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 83256 a05ecb395410818e85aa220f1900fd072967fa6c
parent 83255 6057abf8f4e6f9d4863881298c676cb099a49261
child 83257 202f4ccbbda1da27190358326040bb9d53fec10d
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg, test-only
bugs696535
milestone11.0a1
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)