Fixed issue with Debian bullseye (11).

This commit is contained in:
Antoine Nguyen
2021-09-22 11:32:55 +02:00
parent 32041a40e2
commit 58f5a8af09
8 changed files with 84 additions and 41 deletions

View File

@@ -24,10 +24,11 @@ def get_pip_path(venv):
def install_package(name, venv=None, upgrade=False, binary=True, **kwargs):
"""Install a Python package using pip."""
cmd = "{} install{}{} {}".format(
cmd = "{} install{}{}{} {}".format(
get_pip_path(venv),
" -U" if upgrade else "",
" --no-binary :all:" if not binary else "",
" --pre" if kwargs.pop("beta", False) else "",
name
)
utils.exec_cmd(cmd, **kwargs)
@@ -35,8 +36,12 @@ def install_package(name, venv=None, upgrade=False, binary=True, **kwargs):
def install_packages(names, venv=None, upgrade=False, **kwargs):
"""Install a Python package using pip."""
cmd = "{} install {}{}".format(
get_pip_path(venv), " -U " if upgrade else "", " ".join(names))
cmd = "{} install{}{} {}".format(
get_pip_path(venv),
" -U " if upgrade else "",
" --pre" if kwargs.pop("beta", False) else "",
" ".join(names)
)
utils.exec_cmd(cmd, **kwargs)