mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
setup_venv: Clean up VENV_DEPENDENCIES using parsed lsb_release.
This is mostly a cleanup, but it should also save 50ms in the runtime of create-production-venv.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
from scripts.lib.zulip_tools import run, ENDC, WARNING
|
||||
from scripts.lib.zulip_tools import run, ENDC, WARNING, parse_lsb_release
|
||||
from scripts.lib.hash_reqs import expand_reqs
|
||||
|
||||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
@@ -37,6 +37,12 @@ VENV_DEPENDENCIES = [
|
||||
"libpq-dev", # Needed by psycopg2
|
||||
]
|
||||
|
||||
codename = parse_lsb_release()["DISTRIB_CODENAME"]
|
||||
|
||||
if codename != "trusty":
|
||||
# Workaround for the fact that trusty has a different package name here.
|
||||
VENV_DEPENDENCIES.append("virtualenv")
|
||||
|
||||
THUMBOR_VENV_DEPENDENCIES = [
|
||||
"libcurl4-openssl-dev",
|
||||
"libjpeg-dev",
|
||||
|
||||
Reference in New Issue
Block a user