virtualenv_wrapper: convert all users to python3 only
BUG=chromium:997354
TEST=CQ passes
Change-Id: I0f93f61e56aa84efbab0386f1151bebd7f2f4f63
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2063224
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/virtualenv_wrapper.py b/scripts/virtualenv_wrapper.py
index 0a23049..5d52ecf 100755
--- a/scripts/virtualenv_wrapper.py
+++ b/scripts/virtualenv_wrapper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -14,16 +14,16 @@
try:
import pytest # pylint: disable=import-error
- wrapper = pytest.importorskip('wrapper', reason='File must be run in venv')
+ wrapper3 = pytest.importorskip('wrapper3', reason='File must be run in venv')
except ImportError:
- import wrapper
+ import wrapper3
_CHROMITE_DIR = os.path.realpath(
os.path.join(os.path.abspath(__file__), '..', '..'))
# _VIRTUALENV_DIR contains the scripts for working with venvs
_VIRTUALENV_DIR = os.path.join(_CHROMITE_DIR, '..', 'infra_virtualenv')
-_CREATE_VENV_PATH = os.path.join(_VIRTUALENV_DIR, 'bin', 'create_venv')
+_CREATE_VENV_PATH = os.path.join(_VIRTUALENV_DIR, 'bin', 'create_venv3')
_REQUIREMENTS = os.path.join(_CHROMITE_DIR, 'venv', 'requirements.txt')
_VENV_MARKER = 'INSIDE_CHROMITE_VENV'
@@ -31,7 +31,7 @@
def main():
if _IsInsideVenv(os.environ):
- wrapper.DoMain()
+ wrapper3.DoMain()
else:
venvdir = _CreateVenv()
_ExecInVenv(venvdir, sys.argv)