Commit 3c814957 authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

depot_tools: Run Python scripts using vpython (Part 2)

Tbr: iannucci@chromium.org
Bug: 984182
Change-Id: I2e8469f8ee0acd6a54109697d5a6b76faf24fa42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1748590Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent d6186f99
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
base_dir=$(dirname "$0") base_dir=$(dirname "$0")
PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/download_from_google_storage.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec $base_dir/vpython "$base_dir/download_from_google_storage.py" "$@"
...@@ -9,4 +9,4 @@ setlocal ...@@ -9,4 +9,4 @@ setlocal
set PATH=%PATH%;%~dp0 set PATH=%PATH%;%~dp0
:: Defer control. :: Defer control.
python "%~dp0\download_from_google_storage.py" %* %~dp0\vpython "%~dp0\download_from_google_storage.py" %*
#!/usr/bin/env python #!/usr/bin/env vpython
# 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.
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
base_dir=$(dirname "$0") base_dir=$(dirname "$0")
PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/fetch.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec $base_dir/vpython "$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.
python "%~dp0\fetch.py" %* %~dp0\vpython "%~dp0\fetch.py" %*
#!/usr/bin/env python #!/usr/bin/env vpython
# 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.
......
...@@ -5,18 +5,21 @@ ...@@ -5,18 +5,21 @@
base_dir=$(dirname "$0") base_dir=$(dirname "$0")
if [[ "#grep#fetch#cleanup#diff#setdep#" != *"#$1#"* ]]; then # Update depot_tools unless DEPOT_TOOLS_UPDATE is set to 0
"$base_dir"/update_depot_tools "$@" if [ "X$DEPOT_TOOLS_UPDATE" != "X0" ]; then
case $? in if [[ "#grep#fetch#cleanup#diff#setdep#" != *"#$1#"* ]]; then
123) "$base_dir"/update_depot_tools "$@"
# msys environment was upgraded, need to quit. case $? in
exit 0 123)
;; # msys environment was upgraded, need to quit.
0) exit 0
;; ;;
*) 0)
exit $? ;;
esac *)
exit $?
esac
fi
fi fi
PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/gclient.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec $base_dir/vpython "$base_dir/gclient.py" "$@"
#!/usr/bin/env python #!/usr/bin/env vpython
# Copyright 2013 The Chromium Authors. All rights reserved. # Copyright 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.
......
...@@ -4,12 +4,17 @@ ...@@ -4,12 +4,17 @@
:: found in the LICENSE file. :: found in the LICENSE file.
setlocal setlocal
:: Shall skip automatic update?
IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :SKIP_UPDATE
:: Synchronize the root directory before deferring control back to gclient.py. :: Synchronize the root directory before deferring control back to gclient.py.
call "%~dp0update_depot_tools.bat" %* call "%~dp0update_depot_tools.bat" %*
:SKIP_UPDATE
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used :: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
:: standalone, but allow other PATH manipulations to take priority. :: standalone, but allow other PATH manipulations to take priority.
set PATH=%PATH%;%~dp0 set PATH=%PATH%;%~dp0
:: Defer control. :: Defer control.
python "%~dp0gclient.py" %* %~dp0\vpython "%~dp0\gclient.py" %*
#!/usr/bin/env python #!/usr/bin/env vpython
# 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.
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
base_dir=$(dirname "$0") base_dir=$(dirname "$0")
PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/roll_dep.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec $base_dir/vpython "$base_dir/roll_dep.py" "$@"
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
base_dir=$(dirname "$0") base_dir=$(dirname "$0")
PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/roll_dep_svn.py" "$@" PYTHONDONTWRITEBYTECODE=1 exec $base_dir/vpython "$base_dir/roll_dep_svn.py" "$@"
...@@ -9,4 +9,4 @@ setlocal ...@@ -9,4 +9,4 @@ setlocal
set PATH=%PATH%;%~dp0 set PATH=%PATH%;%~dp0
:: Defer control. :: Defer control.
python "%~dp0\roll_dep_svn.py" %* %~dp0\vpython "%~dp0\roll_dep_svn.py" %*
...@@ -9,4 +9,4 @@ setlocal ...@@ -9,4 +9,4 @@ setlocal
set PATH=%PATH%;%~dp0 set PATH=%PATH%;%~dp0
:: Defer control. :: Defer control.
python "%~dp0\roll_dep.py" %* %~dp0\vpython "%~dp0\roll_dep.py" %*
#!/usr/bin/env python #!/usr/bin/env vpython
# 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.
......
#!/usr/bin/env python #!/usr/bin/env vpython
# Copyright (c) 2014 The Chromium Authors. All rights reserved. # Copyright (c) 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.
......
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