mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
Add yapf to third_party.
This commit is contained in:
parent
ef77d6f553
commit
bb9a927bd5
4 changed files with 11 additions and 7 deletions
4
Docs.md
4
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:
|
||||
|
||||
|
|
|
@ -35,6 +35,11 @@ solutions = [{
|
|||
'https://github.com/cpplint/cpplint.git@a33992f68f36fcaa6d0f531a25012a4c474d3542',
|
||||
'name':
|
||||
'cpplint'
|
||||
}, {
|
||||
'url':
|
||||
'https://github.com/google/yapf.git@32afb3004e0967eab351ee83e3d9d55e3a02fd9b',
|
||||
'name':
|
||||
'yapf'
|
||||
}, {
|
||||
'url':
|
||||
'https://github.com/google/flatbuffers.git@d840856093fa7b935b0d6378c436bd633d006c8c',
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 3107801874b4675c02bed0f3297bb4e7fe995642
|
||||
Subproject commit 9c512cffb422cbe5cf95e2f6f643cf74fa03d345
|
|
@ -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"] +
|
||||
|
|
Loading…
Reference in a new issue