Commit Graph

13 Commits (main)

Author SHA1 Message Date
Sebastien Marchand f5dd9dda9e Make 'compile_single_file' use vpython3
A recent change to autoninja breaks 'compile_single_file' because
autoninja expects to be able to find the 'google.auth' package, which is
available via vpython3.

Change-Id: Ie0c9bc229108daadae27bd85ffc0471d9e7e7fca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5199126
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Sunny Sachanandani 44d6d1a666 Fix compile_single_file with remoteexec
When using remoteexec, calling ninja directly instead of ninja_reclient
causes the build to hang. This also breaks compile_single_file since it
calls ninja directly. To fix this, switch it to call autoninja instead
which will take care of this and other details like using autosiso in
the near future.

Also, using autoninja has the side-effect of using a higher -j value
which can help when building a single file causes a lot of other files
to also be built.

Bug: 1502988
Change-Id: Ib86c5c820f7c53a8420973f1b83bf8e711a9af09
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5037618
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
1 year ago
Gavin Mak f936d540e1 Remove __future__ imports
All __future__ imports (unicode_literals, print_function) are already
mandatory in py3. Also remove an outdated py2 comment in
presubmit_canned_checks.py

Bug: 1475402
Change-Id: I27cf6a8268f6dd1081f22af782c4c29a975376ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4867135
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
1 year ago
Mike Frysinger 124bb8e53c switch to 4 space indent
Leave the recipes/ code at 2 space to match the rest of the recipes
project in other repos.

Reformatted using:
files=( $(
	git ls-tree -r --name-only HEAD | \
		grep -Ev -e '^(third_party|recipes)/' | \
		grep '\.py$';
	git grep -l '#!/usr/bin/env.*python' | grep -v '\.py$'
) )
parallel ./yapf -i -- "${files[@]}"
~/chromiumos/chromite/contrib/reflow_overlong_comments "${files[@]}"

The files that still had strings that were too long were manually
reformatted because they were easy and only a few issues.
autoninja.py
clang_format.py
download_from_google_storage.py
fix_encoding.py
gclient_utils.py
git_cache.py
git_common.py
git_map_branches.py
git_reparent_branch.py
gn.py
my_activity.py
owners_finder.py
presubmit_canned_checks.py
reclient_helper.py
reclientreport.py
roll_dep.py
rustfmt.py
siso.py
split_cl.py
subcommand.py
subprocess2.py
swift_format.py
upload_to_google_storage.py

These files still had lines (strings) that were too long, so the pylint
warnings were suppressed with a TODO.
auth.py
gclient.py
gclient_eval.py
gclient_paths.py
gclient_scm.py
gerrit_util.py
git_cl.py
presubmit_canned_checks.py
presubmit_support.py
scm.py

Change-Id: Ia6535c4f2c48d46b589ec1e791dde6c6b2ea858f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4836379
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Junji Watanabe fc04ff1628 Call ninja.py from compile_single_file.py
ninja.exe will be removed from depot_tools soon.
depot_tools/ninja.py finds the ninja installed by DEPS (or fallback to ninja in PATH).

Bug: 1340825
Change-Id: I0fefe7a3fdb254ca0025d9d8d4490675ac718184
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4061246
Commit-Queue: Junji Watanabe <jwata@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
2 years ago
Aravind Vasudevan c5f0cbb865 Use pylint 2.7 for depot_tools
This includes a few fixes for specific errors, and disables several new
warnings introduced in this version, in order to allow for an incremental migration.

Bug:1262286
Change-Id: I4b8f8fc521386419a3121bbb07edc8ac83170a94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3413679
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Josip Sokcevic 42c5bbbc96 Revert "Use pylint 2.7 for depot_tools"
This reverts commit 22bf605bb6.

Reason for revert: breaks gclient sync

Original change's description:
> Use pylint 2.7 for depot_tools
>
> This includes a few fixes for specific errors, and disables several new
> warnings introduced in this version, in order to allow for an incremental migration.
>
> Bug:1262286
> Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>

Bug: 1262286
Change-Id: Ieb946073c7886c7bf056ce843a5a48e82becf7a5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3413672
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Aravind Vasudevan 22bf605bb6 Use pylint 2.7 for depot_tools
This includes a few fixes for specific errors, and disables several new
warnings introduced in this version, in order to allow for an incremental migration.

Bug:1262286
Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Josip Sokcevic 3912091152 Use py3 for remaining tools in depot_tools path
R=apolito@google.com, dpranke@google.com

Bug: 1199102
Change-Id: I06ff344ac91464eb558e92598c87e43ecfa830dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2994488
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
4 years ago
Takuto Ikuta 6c7b829e54 remove reference to jumbo build
Bug: 994387
Change-Id: I0c675bb6aca04d64593de420c7936cb88ff6a051
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2334503
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
5 years ago
Sebastien Marchand a74bd78e9c Make it clear that compile_single_file.py doesn't support Jumbo builds
compile_single_file.py doesn't support Jumbo build because compiling a
single file goes against the concept of Jumbo builds (where files get
merged together).

Change-Id: Ib53dc22ed8b61839dc936e8e20f7febbb477eff8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1657789
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
6 years ago
Raul Tambre 80ee78e7fa Convert print statements to Python 3 style
Ran "2to3 -w -n -f print ./" and manually added imports.
Ran "^\s*print " and "\s+print " to find batch/shell scripts, comments and the like with embedded code, and updated them manually.
Also manually added imports to files, which used print as a function, but were missing the import.

The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 942522
Change-Id: Id777e4d4df4adcdfdab1b18bde89f235ef491b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1595684
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
6 years ago
Sebastien Marchand 4dd9682b11 Add a script to make it easier to build a single source file with ninja
Bug: 759146
Change-Id: I19edd0b525044655bb9a38b7ada0be9064457f38
Reviewed-on: https://chromium-review.googlesource.com/636446
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
8 years ago