mirror of https://github.com/zulip/zulip.git
Factor out venv-installation into a script.
This commit is contained in:
parent
c791037166
commit
852c49a44e
|
@ -178,10 +178,7 @@ def main():
|
|||
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'])
|
||||
run(["tools/setup/setup-venvs"])
|
||||
|
||||
# Put Python2 virtualenv activation in our .bash_profile.
|
||||
with open(os.path.expanduser('~/.bash_profile'), 'w+') as bash_profile:
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
from os.path import dirname, abspath
|
||||
|
||||
ZULIP_PATH = dirname(dirname(dirname(abspath(__file__))))
|
||||
if ZULIP_PATH not in sys.path:
|
||||
sys.path.append(ZULIP_PATH)
|
||||
|
||||
from scripts.lib.setup_venv import setup_virtualenv
|
||||
|
||||
PY2_DEV_REQS_FILE = os.path.join(ZULIP_PATH, "requirements", "py2_dev.txt")
|
||||
setup_virtualenv("/srv/zulip-venv", PY2_DEV_REQS_FILE)
|
||||
|
||||
PY3_DEV_REQS_FILE = os.path.join(ZULIP_PATH, "requirements", "py3_dev.txt")
|
||||
setup_virtualenv("/srv/zulip-py3-venv", PY3_DEV_REQS_FILE, virtualenv_args=['-p', 'python3'])
|
Loading…
Reference in New Issue