summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Docs.md4
-rw-r--r--gclient_config.py5
m---------third_party0
-rwxr-xr-xtools/format.py7
4 files changed, 10 insertions, 6 deletions
diff --git a/Docs.md b/Docs.md
index 89fa01c05..069a0e8b6 100644
--- a/Docs.md
+++ b/Docs.md
@@ -114,10 +114,6 @@ submodule. However, you need to install separately:
3. Enable `Debugging Tools for Windows`, Goto Control Panel -> Windows 10 SDK
-> Right-Click -> Change -> Change -> Check Debugging Tools for Windows ->
Change -> Finish
-6. Before running `./tools/format.py`, make sure you have `yapf` installed for
- the current Python and `rustfmt` for Rust. They can be installed by:
-
- pip install yapf rustup component add rustfmt-preview
### Build:
diff --git a/gclient_config.py b/gclient_config.py
index 93d744a3f..dc4a75e5b 100644
--- a/gclient_config.py
+++ b/gclient_config.py
@@ -37,6 +37,11 @@ solutions = [{
'cpplint'
}, {
'url':
+ 'https://github.com/google/yapf.git@32afb3004e0967eab351ee83e3d9d55e3a02fd9b',
+ 'name':
+ 'yapf'
+}, {
+ 'url':
'https://github.com/google/flatbuffers.git@d840856093fa7b935b0d6378c436bd633d006c8c',
'name':
'flatbuffers'
diff --git a/third_party b/third_party
-Subproject 3107801874b4675c02bed0f3297bb4e7fe99564
+Subproject 9c512cffb422cbe5cf95e2f6f643cf74fa03d34
diff --git a/tools/format.py b/tools/format.py
index 0dc100b9f..5956432dc 100755
--- a/tools/format.py
+++ b/tools/format.py
@@ -2,6 +2,7 @@
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
from glob import glob
import os
+import sys
from third_party import third_party_path, fix_symlinks, google_env, clang_format_path
from util import root_path, run, find_exts, platform
@@ -26,8 +27,10 @@ for fn in ["BUILD.gn", ".gn"] + find_exts("build_extra", ".gn", ".gni"):
# 'third_party/v8/tools/clang', which contains many .py files.
# * These third party python files shouldn't be formatted.
# * The tools directory has no subdirectories, so `glob()` is sufficient.
-# TODO(ry) Install yapf in third_party.
-run(["yapf", "-i"] + glob("tools/*.py") + find_exts("build_extra", ".py"))
+
+run([sys.executable, "third_party/yapf/yapf", "-i"] + glob("tools/*.py") +
+ find_exts("build_extra", ".py"),
+ merge_env={"PYTHONPATH": "third_party/yapf"})
# yapf: disable
run(["node", prettier, "--write"] +