Install modoboa from sources until we find a solution.

see #197
This commit is contained in:
Antoine Nguyen
2018-04-11 14:12:24 +02:00
parent 0458b30135
commit ff2bf9994d
2 changed files with 14 additions and 6 deletions

View File

@@ -22,10 +22,14 @@ def get_pip_path(venv):
return binpath
def install_package(name, venv=None, upgrade=False, **kwargs):
def install_package(name, venv=None, upgrade=False, binary=True, **kwargs):
"""Install a Python package using pip."""
cmd = "{} install {}{}".format(
get_pip_path(venv), " -U " if upgrade else "", name)
cmd = "{} install{}{} {}".format(
get_pip_path(venv),
" -U" if upgrade else "",
" --no-binary :all:" if not binary else "",
name
)
utils.exec_cmd(cmd, **kwargs)
@@ -67,4 +71,4 @@ def setup_virtualenv(path, sudo_user=None, python_version=2):
utils.exec_cmd("virtualenv {}".format(path))
else:
utils.exec_cmd("{} -m venv {}".format(python_binary, path))
install_package("pip", venv=path, upgrade=True)
install_packages(["pip", "setuptools"], venv=path, upgrade=True)