mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use OS-agnostic filesystem paths in Python
This will eventually need to be done for #1908
This commit is contained in:
parent
ca36779a7e
commit
244af42d89
4 changed files with 26 additions and 26 deletions
|
@ -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
|
||||
|
|
|
@ -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'),
|
||||
]
|
||||
|
||||
|
|
|
@ -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'),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue