mirror of https://github.com/zulip/zulip.git
create-production-venv: Add PY3 support to production venv creation script.
Create production python virtual env based on system python version.
This commit is contained in:
parent
e7642daa2a
commit
14545d1647
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import argparse
|
||||
|
@ -19,5 +19,10 @@ args = parser.parse_args()
|
|||
# install dependencies for setting up the virtualenv
|
||||
run(["apt-get", "-y", "install"] + VENV_DEPENDENCIES)
|
||||
|
||||
cached_venv_path = setup_virtualenv(args.target, os.path.join(ZULIP_PATH, "requirements", "py2_prod.txt"))
|
||||
python_version = sys.version_info[0]
|
||||
|
||||
cached_venv_path = setup_virtualenv(
|
||||
args.target,
|
||||
os.path.join(ZULIP_PATH, "requirements", "py{}_prod.txt".format(python_version)),
|
||||
virtualenv_args=['-p', 'python{}'.format(python_version)])
|
||||
# Now the virtualenv has been activated
|
||||
|
|
Loading…
Reference in New Issue