mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
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:
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
@@ -19,5 +19,10 @@ args = parser.parse_args()
|
|||||||
# install dependencies for setting up the virtualenv
|
# install dependencies for setting up the virtualenv
|
||||||
run(["apt-get", "-y", "install"] + VENV_DEPENDENCIES)
|
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
|
# Now the virtualenv has been activated
|
||||||
|
|||||||
Reference in New Issue
Block a user