Skip to content

Commit

Permalink
depot_tools: Move six to depot_tools' .vpython
Browse files Browse the repository at this point in the history
Bug: 984182
Change-Id: I34a242c8607624beb0f06a27c563e413dec99790
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1717492
Commit-Queue: Edward Lesmes <[email protected]>
Reviewed-by: Andrii Shyshkalov <[email protected]>
Reviewed-by: Robbie Iannucci <[email protected]>
Reviewed-by: Michael Moss <[email protected]>
  • Loading branch information
Edward Lemur authored and Commit Bot committed Jul 25, 2019
1 parent d242ed7 commit 3a98df0
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 811 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# vpython specs
/gsutil.vpython recipes
/.vpython recipes

# Extensionless tools we want and support scripts.
/autoninja* recipes
Expand Down
10 changes: 10 additions & 0 deletions .vpython
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
python_version: "2.7"

# Used by:
# testing_support/super_mox.py
wheel: <
name: "infra/python/wheels/mox-py2_py3"
version: "version:0.5.3"
>

# Used by:
# gclient.py
# testing_support/super_mox.py
# upload_metrics.py
wheel: <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.12.0"
>
2 changes: 1 addition & 1 deletion cit
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

base_dir=$(dirname "$0")

PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/cit.py" "$@"
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/cit.py" "$@"
2 changes: 1 addition & 1 deletion cit.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ setlocal
set PATH=%PATH%;%~dp0

:: Defer control.
python "%~dp0\cit.py" %*
vpython "%~dp0\cit.py" %*
2 changes: 1 addition & 1 deletion cit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env vpython
# Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion fetch
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

base_dir=$(dirname "$0")

PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/fetch.py" "$@"
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/fetch.py" "$@"
2 changes: 1 addition & 1 deletion fetch.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ call "%~dp0\update_depot_tools.bat"
set PATH=%PATH%;%~dp0

:: Defer control.
python "%~dp0\fetch.py" %*
vpython "%~dp0\fetch.py" %*
2 changes: 1 addition & 1 deletion fetch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env vpython
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion gclient
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ if [[ "#grep#fetch#cleanup#diff#setdep#" != *"#$1#"* ]]; then
esac
fi

PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/gclient.py" "$@"
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/gclient.py" "$@"
2 changes: 1 addition & 1 deletion gclient.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ call "%~dp0update_depot_tools.bat" %*
set PATH=%PATH%;%~dp0

:: Defer control.
python "%~dp0gclient.py" %*
vpython "%~dp0gclient.py" %*
4 changes: 2 additions & 2 deletions gclient.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env vpython
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down Expand Up @@ -94,6 +94,7 @@
import posixpath
import pprint
import re
import six
import sys
import time

Expand All @@ -116,7 +117,6 @@
import subprocess2
import setup_color

from third_party import six


# TODO(crbug.com/953884): Remove this when python3 migration is done.
Expand Down
2 changes: 1 addition & 1 deletion git-runhooks
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ if [ "${kernel_name:0:5}" = "MINGW" ]; then
cmd "/C ${dir}\\python.bat ${dir}\\gclient.py runhooks --spec=$gclient_spec"
else
dir="$(dirname $0)"
PYTHONDONTWRITEBYTECODE=1 exec python "$dir/gclient.py" runhooks --spec="$gclient_spec"
PYTHONDONTWRITEBYTECODE=1 exec vpython "$dir/gclient.py" runhooks --spec="$gclient_spec"
fi
exit $?
2 changes: 1 addition & 1 deletion git_cl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env vpython
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion git_nav_downstream.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env vpython
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
2 changes: 1 addition & 1 deletion roll-dep
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

base_dir=$(dirname "$0")

PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/roll_dep.py" "$@"
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/roll_dep.py" "$@"
2 changes: 1 addition & 1 deletion roll-dep.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ setlocal
set PATH=%PATH%;%~dp0

:: Defer control.
python "%~dp0\roll_dep.py" %*
vpython "%~dp0\roll_dep.py" %*
2 changes: 1 addition & 1 deletion roll_dep.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env vpython
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down
3 changes: 1 addition & 2 deletions testing_support/super_mox.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
import subprocess
import sys

sys.path.append(os.path.dirname(os.path.dirname(__file__)))
import mox
from third_party.six.moves import StringIO
from six.moves import StringIO


class IsOneOf(mox.Comparator):
Expand Down
18 changes: 0 additions & 18 deletions third_party/six/LICENSE.txt

This file was deleted.

10 changes: 0 additions & 10 deletions third_party/six/README.chromium

This file was deleted.

Loading

0 comments on commit 3a98df0

Please sign in to comment.