Commit f994d87e authored by James Darpinian's avatar James Darpinian Committed by Commit Bot

Revert "Reland "depot_tools: Move six to depot_tools' .vpython""

This reverts commit d52b306f.

Reason for revert: Broke ANGLE CQ with "ImportError: No module named six"
Example: https://ci.chromium.org/p/angle/builders/try/mac-dbg/6758

Original change's description:
> Reland "depot_tools: Move six to depot_tools' .vpython"
> 
> This is a reland of 3a98df0b
> 
> Original change's description:
> > depot_tools: Move six to depot_tools' .vpython
> > 
> > Bug: 984182
> > Change-Id: I34a242c8607624beb0f06a27c563e413dec99790
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1717492
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> > Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> > Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> > Reviewed-by: Michael Moss <mmoss@chromium.org>
> 
> Bug: 984182
> Change-Id: Ibf7034201e65a18f833cf1e7432f81a903a99aae
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1732880
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=iannucci@chromium.org,mmoss@chromium.org,tandrii@chromium.org,ehmaldonado@chromium.org

Change-Id: Id4488249b607441df9f00aa51f4a1f2bc4ad5cfd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 984182
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1739582Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
parent 3ff0e5df
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
# vpython specs # vpython specs
/gsutil.vpython recipes /gsutil.vpython recipes
/.vpython recipes
# Extensionless tools we want and support scripts. # Extensionless tools we want and support scripts.
/autoninja* recipes /autoninja* recipes
......
python_version: "2.7" python_version: "2.7"
# Used by: # Used by:
# testing_support/super_mox.py # testing_support/super_mox.py
wheel: < wheel: <
name: "infra/python/wheels/mox-py2_py3" name: "infra/python/wheels/mox-py2_py3"
version: "version:0.5.3" 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"
>
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
base_dir=$(dirname "$0") base_dir=$(dirname "$0")
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/cit.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/cit.py" "$@"
...@@ -9,4 +9,4 @@ setlocal ...@@ -9,4 +9,4 @@ setlocal
set PATH=%PATH%;%~dp0 set PATH=%PATH%;%~dp0
:: Defer control. :: Defer control.
vpython "%~dp0\cit.py" %* python "%~dp0\cit.py" %*
#!/usr/bin/env vpython #!/usr/bin/env python
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
base_dir=$(dirname "$0") base_dir=$(dirname "$0")
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/fetch.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/fetch.py" "$@"
...@@ -12,4 +12,4 @@ call "%~dp0\update_depot_tools.bat" ...@@ -12,4 +12,4 @@ call "%~dp0\update_depot_tools.bat"
set PATH=%PATH%;%~dp0 set PATH=%PATH%;%~dp0
:: Defer control. :: Defer control.
vpython "%~dp0\fetch.py" %* python "%~dp0\fetch.py" %*
#!/usr/bin/env vpython #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
...@@ -19,4 +19,4 @@ if [[ "#grep#fetch#cleanup#diff#setdep#" != *"#$1#"* ]]; then ...@@ -19,4 +19,4 @@ if [[ "#grep#fetch#cleanup#diff#setdep#" != *"#$1#"* ]]; then
esac esac
fi fi
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/gclient.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/gclient.py" "$@"
...@@ -12,4 +12,4 @@ call "%~dp0update_depot_tools.bat" %* ...@@ -12,4 +12,4 @@ call "%~dp0update_depot_tools.bat" %*
set PATH=%PATH%;%~dp0 set PATH=%PATH%;%~dp0
:: Defer control. :: Defer control.
vpython "%~dp0gclient.py" %* python "%~dp0gclient.py" %*
#!/usr/bin/env vpython #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
...@@ -94,7 +94,6 @@ import platform ...@@ -94,7 +94,6 @@ import platform
import posixpath import posixpath
import pprint import pprint
import re import re
import six
import sys import sys
import time import time
...@@ -117,6 +116,7 @@ import subcommand ...@@ -117,6 +116,7 @@ import subcommand
import subprocess2 import subprocess2
import setup_color import setup_color
from third_party import six
# TODO(crbug.com/953884): Remove this when python3 migration is done. # TODO(crbug.com/953884): Remove this when python3 migration is done.
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
import ast import ast
import collections import collections
import logging import logging
import six
import sys import sys
import tokenize import tokenize
import gclient_utils import gclient_utils
from third_party import schema from third_party import schema
from third_party import six
if six.PY2: if six.PY2:
# We use cStringIO.StringIO because it is equivalent to Py3's io.StringIO. # We use cStringIO.StringIO because it is equivalent to Py3's io.StringIO.
......
...@@ -15,9 +15,9 @@ gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]" ...@@ -15,9 +15,9 @@ gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]"
kernel_name=$(uname -s) kernel_name=$(uname -s)
if [ "${kernel_name:0:5}" = "MINGW" ]; then if [ "${kernel_name:0:5}" = "MINGW" ]; then
dir="${0%\\*}" dir="${0%\\*}"
vpython "${dir}\\gclient.py" "runhooks" "--spec=$gclient_spec" cmd "/C ${dir}\\python.bat ${dir}\\gclient.py runhooks --spec=$gclient_spec"
else else
dir="$(dirname $0)" dir="$(dirname $0)"
PYTHONDONTWRITEBYTECODE=1 exec vpython "$dir/gclient.py" runhooks --spec="$gclient_spec" PYTHONDONTWRITEBYTECODE=1 exec python "$dir/gclient.py" runhooks --spec="$gclient_spec"
fi fi
exit $? exit $?
#!/usr/bin/env vpython #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
#!/usr/bin/env vpython #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved. # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
...@@ -12,8 +12,8 @@ base_dir=$(dirname "$0") ...@@ -12,8 +12,8 @@ base_dir=$(dirname "$0")
OUTPUT="$(uname | grep 'MINGW')" OUTPUT="$(uname | grep 'MINGW')"
MINGW=$? MINGW=$?
if [ $MINGW = 0 ]; then if [ -e "$base_dir/python.bat" -a $MINGW = 0 ]; then
PYTHONDONTWRITEBYTECODE=1 vpython "$base_dir\\pylint.py" "$@" PYTHONDONTWRITEBYTECODE=1 cmd.exe //c "$base_dir\\python.bat" "$base_dir\\pylint.py" "$@"
else else
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/pylint.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/pylint.py" "$@"
fi fi
#!/usr/bin/env vpython #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
...@@ -47,9 +47,9 @@ SCRIPT="${SCRIPT-${BASENAME//-/_}.py}" ...@@ -47,9 +47,9 @@ SCRIPT="${SCRIPT-${BASENAME//-/_}.py}"
if [[ $PYTHON_DIRECT = 1 ]]; then if [[ $PYTHON_DIRECT = 1 ]]; then
python.exe "$DEPOT_TOOLS\\$SCRIPT" "$@" python.exe "$DEPOT_TOOLS\\$SCRIPT" "$@"
else else
if [ $OSTYPE = msys ]; then if [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
PYTHONDONTWRITEBYTECODE=1 vpython "$DEPOT_TOOLS\\$SCRIPT" "$@" cmd.exe //c "$DEPOT_TOOLS\\python.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@"
else else
PYTHONDONTWRITEBYTECODE=1 exec "$DEPOT_TOOLS/$SCRIPT" "$@" exec "$DEPOT_TOOLS/$SCRIPT" "$@"
fi fi
fi fi
...@@ -311,7 +311,7 @@ def call_gclient(*args, **kwargs): ...@@ -311,7 +311,7 @@ def call_gclient(*args, **kwargs):
args: command-line arguments to pass to gclient. args: command-line arguments to pass to gclient.
kwargs: keyword arguments to pass to call. kwargs: keyword arguments to pass to call.
""" """
cmd = ['vpython', '-u', GCLIENT_PATH] cmd = [sys.executable, '-u', GCLIENT_PATH]
cmd.extend(args) cmd.extend(args)
# Disable metrics collection on bots, since it's not supported anyway. # Disable metrics collection on bots, since it's not supported anyway.
kwargs.setdefault('env', {})['DEPOT_TOOLS_METRICS'] = '0' kwargs.setdefault('env', {})['DEPOT_TOOLS_METRICS'] = '0'
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
base_dir=$(dirname "$0") base_dir=$(dirname "$0")
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/roll_dep.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/roll_dep.py" "$@"
...@@ -9,4 +9,4 @@ setlocal ...@@ -9,4 +9,4 @@ setlocal
set PATH=%PATH%;%~dp0 set PATH=%PATH%;%~dp0
:: Defer control. :: Defer control.
vpython "%~dp0\roll_dep.py" %* python "%~dp0\roll_dep.py" %*
#!/usr/bin/env vpython #!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved. # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
......
...@@ -13,8 +13,9 @@ import string ...@@ -13,8 +13,9 @@ import string
import subprocess import subprocess
import sys import sys
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
import mox import mox
from six.moves import StringIO from third_party.six.moves import StringIO
class IsOneOf(mox.Comparator): class IsOneOf(mox.Comparator):
......
...@@ -164,7 +164,7 @@ class BotUpdateUnittests(unittest.TestCase): ...@@ -164,7 +164,7 @@ class BotUpdateUnittests(unittest.TestCase):
self.call = MockedCall(self.filesystem) self.call = MockedCall(self.filesystem)
self.gclient = MockedGclientSync(self.filesystem) self.gclient = MockedGclientSync(self.filesystem)
self.call.expect( self.call.expect(
('vpython', '-u', bot_update.GCLIENT_PATH, 'sync') (sys.executable, '-u', bot_update.GCLIENT_PATH, 'sync')
).returns(self.gclient) ).returns(self.gclient)
self.old_call = getattr(bot_update, 'call') self.old_call = getattr(bot_update, 'call')
self.params = copy.deepcopy(self.DEFAULT_PARAMS) self.params = copy.deepcopy(self.DEFAULT_PARAMS)
...@@ -187,7 +187,7 @@ class BotUpdateUnittests(unittest.TestCase): ...@@ -187,7 +187,7 @@ class BotUpdateUnittests(unittest.TestCase):
def overrideSetupForWindows(self): def overrideSetupForWindows(self):
sys.platform = 'win' sys.platform = 'win'
self.call.expect( self.call.expect(
('vpython', '-u', bot_update.GCLIENT_PATH, 'sync') (sys.executable, '-u', bot_update.GCLIENT_PATH, 'sync')
).returns(self.gclient) ).returns(self.gclient)
def testBasic(self): def testBasic(self):
...@@ -240,7 +240,7 @@ class BotUpdateUnittests(unittest.TestCase): ...@@ -240,7 +240,7 @@ class BotUpdateUnittests(unittest.TestCase):
gclient_sync_cmd = None gclient_sync_cmd = None
for record in self.call.records: for record in self.call.records:
args = record[0] args = record[0]
if args[:4] == ('vpython', '-u', bot_update.GCLIENT_PATH, 'sync'): if args[:4] == (sys.executable, '-u', bot_update.GCLIENT_PATH, 'sync'):
gclient_sync_cmd = args gclient_sync_cmd = args
self.assertTrue('--break_repo_locks' in gclient_sync_cmd) self.assertTrue('--break_repo_locks' in gclient_sync_cmd)
......
Copyright (c) 2010-2014 Benjamin Peterson
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
URL: https://pypi.python.org/pypi/six
Version: 1.8.0
License: MIT
License File: LICENSE.txt
Description:
This directory contains the Python six module.
Local Modifications:
None
This diff is collapsed.
#!/usr/bin/env vpython #!/usr/bin/env python
# Copyright (c) 2018 The Chromium Authors. All rights reserved. # Copyright (c) 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import sys import sys
from six.moves import urllib from third_party.six.moves import urllib
from six.moves import input # pylint: disable=redefined-builtin from third_party.six.moves import input # pylint: disable=redefined-builtin
import metrics_utils import metrics_utils
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment