mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
tools/provision.py: Install both py2 and py3 venvs.
Install both python2 and python3 venvs in tools/provision.py by default. Use old behavior when run with --travis to save time.
This commit is contained in:
@@ -166,6 +166,7 @@ def main():
|
||||
run(["wget", "-O", temp_deb_path, TSEARCH_URL])
|
||||
run(["sudo", "dpkg", "--install", temp_deb_path])
|
||||
|
||||
if TRAVIS:
|
||||
if PY2:
|
||||
MYPY_REQS_FILE = os.path.join(ZULIP_PATH, "requirements", "mypy.txt")
|
||||
setup_virtualenv(PY3_VENV_PATH, MYPY_REQS_FILE, virtualenv_args=['-p', 'python3'])
|
||||
@@ -174,6 +175,11 @@ def main():
|
||||
else:
|
||||
DEV_REQS_FILE = os.path.join(ZULIP_PATH, "requirements", "py3_dev.txt")
|
||||
setup_virtualenv(VENV_PATH, DEV_REQS_FILE, virtualenv_args=['-p', 'python3'])
|
||||
else:
|
||||
DEV_REQS_FILE = os.path.join(ZULIP_PATH, "requirements", "py2_dev.txt")
|
||||
setup_virtualenv(PY2_VENV_PATH, DEV_REQS_FILE)
|
||||
DEV_REQS_FILE = os.path.join(ZULIP_PATH, "requirements", "py3_dev.txt")
|
||||
setup_virtualenv(PY3_VENV_PATH, DEV_REQS_FILE, virtualenv_args=['-p', 'python3'])
|
||||
|
||||
# Put Python2 virtualenv activation in our .bash_profile.
|
||||
with open(os.path.expanduser('~/.bash_profile'), 'w+') as bash_profile:
|
||||
|
||||
Reference in New Issue
Block a user