Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tools/v8/node_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# for py2/py3 compatibility
from __future__ import print_function

import fileinput
import os
import pipes
import shutil
Expand Down Expand Up @@ -40,6 +41,16 @@ def _Get(v8_path):
depot_tools = _Get(v8_path)
assert depot_tools is not None
print("Using depot tools in %s" % depot_tools)
# Patch python3 wrapper to not depend on Google's hermetic Python.
for line in fileinput.input(files=(os.path.join(depot_tools, "python-bin", "python3")),inplace=True):
sys.stdout.write(line)
if "DEPOT_TOOLS=$(dirname \"$0\")/.." in line:
sys.stdout.write("""
if [[ $VPYTHON_BYPASS == \"manually managed python not supported by chrome operations\" ]]
then
exec python3 \"$@\"
fi
""")
return depot_tools

def UninitGit(v8_path):
Expand Down
Loading