mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
Factor out apt dependencies for setting up virtualenv.
Move apt dependencies for creating a virtualenv from provision.py to scripts/lib/setup_venv.py.
This commit is contained in:
committed by
Tim Abbott
parent
3ca76b63c9
commit
0365a4a9f2
12
provision.py
12
provision.py
@@ -9,7 +9,7 @@ os.environ["PYTHONUNBUFFERED"] = "y"
|
|||||||
|
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||||
from zulip_tools import run
|
from zulip_tools import run
|
||||||
from scripts.lib.setup_venv import setup_virtualenv
|
from scripts.lib.setup_venv import setup_virtualenv, VENV_DEPENDENCIES
|
||||||
|
|
||||||
SUPPORTED_PLATFORMS = {
|
SUPPORTED_PLATFORMS = {
|
||||||
"Ubuntu": [
|
"Ubuntu": [
|
||||||
@@ -55,20 +55,12 @@ POSTGRES_VERSION = POSTGRES_VERSION_MAP[codename]
|
|||||||
|
|
||||||
UBUNTU_COMMON_APT_DEPENDENCIES = [
|
UBUNTU_COMMON_APT_DEPENDENCIES = [
|
||||||
"closure-compiler",
|
"closure-compiler",
|
||||||
"libfreetype6-dev",
|
|
||||||
"libffi-dev",
|
|
||||||
"memcached",
|
"memcached",
|
||||||
"rabbitmq-server",
|
"rabbitmq-server",
|
||||||
"libldap2-dev",
|
|
||||||
"redis-server",
|
"redis-server",
|
||||||
"postgresql-server-dev-all",
|
|
||||||
"libmemcached-dev",
|
|
||||||
"python-dev",
|
|
||||||
"python3-dev", # Needed to install typed-ast dependency of mypy
|
|
||||||
"hunspell-en-us",
|
"hunspell-en-us",
|
||||||
"nodejs",
|
"nodejs",
|
||||||
"nodejs-legacy",
|
"nodejs-legacy",
|
||||||
"python-virtualenv",
|
|
||||||
"supervisor",
|
"supervisor",
|
||||||
"git",
|
"git",
|
||||||
"npm",
|
"npm",
|
||||||
@@ -79,7 +71,7 @@ UBUNTU_COMMON_APT_DEPENDENCIES = [
|
|||||||
"gettext", # Used by makemessages i18n
|
"gettext", # Used by makemessages i18n
|
||||||
"curl", # Used for fetching PhantomJS as wget occasionally fails on redirects
|
"curl", # Used for fetching PhantomJS as wget occasionally fails on redirects
|
||||||
"netcat", # Used for flushing memcached
|
"netcat", # Used for flushing memcached
|
||||||
]
|
] + VENV_DEPENDENCIES
|
||||||
|
|
||||||
APT_DEPENDENCIES = {
|
APT_DEPENDENCIES = {
|
||||||
"trusty": UBUNTU_COMMON_APT_DEPENDENCIES + [
|
"trusty": UBUNTU_COMMON_APT_DEPENDENCIES + [
|
||||||
|
|||||||
@@ -17,6 +17,17 @@ if False:
|
|||||||
# Don't add a runtime dependency on typing
|
# Don't add a runtime dependency on typing
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
VENV_DEPENDENCIES = [
|
||||||
|
"libffi-dev",
|
||||||
|
"libfreetype6-dev",
|
||||||
|
"libldap2-dev",
|
||||||
|
"libmemcached-dev",
|
||||||
|
"postgresql-server-dev-all",
|
||||||
|
"python3-dev", # Needed to install typed-ast dependency of mypy
|
||||||
|
"python-dev",
|
||||||
|
"python-virtualenv",
|
||||||
|
]
|
||||||
|
|
||||||
def setup_virtualenv(target_venv_path, requirements_file, virtualenv_args=None):
|
def setup_virtualenv(target_venv_path, requirements_file, virtualenv_args=None):
|
||||||
# type: (str, str, List[str]) -> None
|
# type: (str, str, List[str]) -> None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user