Add workaround for Debian 10 and older

If `lsb_release -rs` returns a value greater than 10 the package `python-dev-is-python3` will be installed. If it is equal or less than 10 the package will not be installed.
This commit is contained in:
Marius Leonhardt 2022-12-05 16:30:05 +01:00
parent d588438840
commit 6fb60c9aea
No known key found for this signature in database
GPG Key ID: 72A12DC0CC925456

View File

@ -37,7 +37,12 @@ INLINE_CRIPT
def self.pip_setup(machine, pip_install_cmd = "")
machine.communicate.sudo "apt-get update -y -qq"
machine.communicate.sudo "DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev-is-python3"
debian_version = machine.communicate.execute "lsb_release -rs", error_check: false
if debian_version > 10
machine.communicate.sudo "DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev python-dev-is-python3"
else
machine.communicate.sudo "DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --option \"Dpkg::Options::=--force-confold\" build-essential curl git libssl-dev libffi-dev"
end
Pip::get_pip machine, pip_install_cmd
end