setup_venv: Used get_venv_dependencies() to return correct VENV dependencies.

Used get_venv_dependencies function to return the correct dependencies
for RHEL, Centos, Fedora rather than importing them as separate
COMMON_YUM_DEPENDENCIES in provision and create-production-venv.
This commit is contained in:
arpit551
2020-03-23 01:36:37 +05:30
committed by Tim Abbott
parent 25e091a065
commit 258de497a8
3 changed files with 17 additions and 17 deletions

View File

@@ -10,8 +10,7 @@ if ZULIP_PATH not in sys.path:
from scripts.lib.zulip_tools import os_families, overwrite_symlink, run, parse_os_release
from scripts.lib.setup_venv import (
setup_virtualenv, get_venv_dependencies, REDHAT_VENV_DEPENDENCIES,
FEDORA_VENV_DEPENDENCIES
setup_virtualenv, get_venv_dependencies
)
parser = argparse.ArgumentParser(description="Create a production virtualenv with caching")
@@ -26,11 +25,7 @@ VENV_DEPENDENCIES = get_venv_dependencies(vendor, os_version)
if "debian" in os_families():
run(["apt-get", "-y", "install"] + VENV_DEPENDENCIES)
elif "fedora" in os_families():
if "rhel" in os_families():
_VENV_DEPS = REDHAT_VENV_DEPENDENCIES
else:
_VENV_DEPS = FEDORA_VENV_DEPENDENCIES
run(["yum", "-y", "install"] + _VENV_DEPS)
run(["yum", "-y", "install"] + VENV_DEPENDENCIES)
else:
print("Unsupported platform: {}".format(distro_info['ID']))
sys.exit(1)