diff --git a/components/script/dom/bindings/codegen/BindingGen.py b/components/script/dom/bindings/codegen/BindingGen.py index 0649db6f1f9..5debf3e1f0f 100644 --- a/components/script/dom/bindings/codegen/BindingGen.py +++ b/components/script/dom/bindings/codegen/BindingGen.py @@ -3,9 +3,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. import sys -sys.path.append("./parser/") -sys.path.append("./ply/") import os +sys.path.append(os.path.join(".", "parser")) +sys.path.append(os.path.join(".", "ply")) import cPickle from Configuration import Configuration from CodegenRust import CGBindingRoot, replaceFileIfChanged diff --git a/components/script/dom/bindings/codegen/GlobalGen.py b/components/script/dom/bindings/codegen/GlobalGen.py index 4d564aab0ac..6a83d069e02 100644 --- a/components/script/dom/bindings/codegen/GlobalGen.py +++ b/components/script/dom/bindings/codegen/GlobalGen.py @@ -6,9 +6,9 @@ # and generate information for subsequent phases. import sys -sys.path.append("./parser/") -sys.path.append("./ply/") import os +sys.path.append(os.path.join(".", "parser")) +sys.path.append(os.path.join(".", "ply")) import WebIDL import cPickle from Configuration import Configuration @@ -66,7 +66,7 @@ def main(): ('RegisterBindings', 'RegisterBindings.rs'), ('InterfaceTypes', 'InterfaceTypes.rs'), ('InheritTypes', 'InheritTypes.rs'), - ('Bindings', 'Bindings/mod.rs'), + ('Bindings', os.path.join('Bindings', 'mod.rs')), ('UnionTypes', 'UnionTypes.rs'), ] diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index 2e36b0cefc0..19b1ad666e8 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -11,18 +11,18 @@ import sys from distutils.spawn import find_executable SEARCH_PATHS = [ - "python/mach", - "tests/wpt", - "tests/wpt/harness", + os.path.join("python", "mach"), + os.path.join("tests", "wpt"), + os.path.join("tests", "wpt", "harness"), ] # Individual files providing mach commands. MACH_MODULES = [ - 'python/servo/bootstrap_commands.py', - 'python/servo/build_commands.py', - 'python/servo/testing_commands.py', - 'python/servo/post_build_commands.py', - 'python/servo/devenv_commands.py', + os.path.join('python', 'servo', 'bootstrap_commands.py'), + os.path.join('python', 'servo', 'build_commands.py'), + os.path.join('python', 'servo', 'testing_commands.py'), + os.path.join('python', 'servo', 'post_build_commands.py'), + os.path.join('python', 'servo', 'devenv_commands.py'), ] diff --git a/python/tidy.py b/python/tidy.py index 95691893525..b2e94fcafca 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -22,23 +22,23 @@ reftest_filetype = ".list" ignored_files = [ # Upstream - "./support/*", - "./tests/wpt/*", - "./python/mach/*", - "./components/script/dom/bindings/codegen/parser/*", - "./components/script/dom/bindings/codegen/ply/*", - "./python/_virtualenv/*", + os.path.join(".", "support", "*"), + os.path.join(".", "tests", "wpt", "*"), + os.path.join(".", "python", "mach", "*"), + os.path.join(".", "components", "script", "dom", "bindings", "codegen", "parser", "*"), + os.path.join(".", "components", "script", "dom", "bindings", "codegen", "ply", "*"), + os.path.join(".", "python", "_virtualenv", "*"), # Generated and upstream code combined with our own. Could use cleanup - "./target/*", - "./ports/gonk/src/native_window_glue.cpp", - "./ports/cef/*", + os.path.join(".", "target", "*"), + os.path.join(".", "ports", "gonk", "src", "native_window_glue.cpp"), + os.path.join(".", "ports", "cef", "*"), # MIT license - "./components/util/deque/mod.rs", + os.path.join(".", "components", "util", "deque", "mod.rs"), # Hidden files/directories - "./.*", + os.path.join(".", ".*"), ] @@ -192,8 +192,8 @@ def check_toml(file_name, contents): def check_rust(file_name, contents): if not file_name.endswith(".rs") or \ file_name.endswith("properties.mako.rs") or \ - file_name.endswith("style/build.rs") or \ - file_name.endswith("unit/style/stylesheets.rs"): + file_name.endswith(os.path.join("style", "build.rs")) or \ + file_name.endswith(os.path.join("unit", "style", "stylesheets.rs")): raise StopIteration contents = contents.splitlines(True) comment_depth = 0