Skip to content

Commit

Permalink
bootstrap: use python version based required packages
Browse files Browse the repository at this point in the history
Signed-off-by: Kyr Shatskyy <[email protected]>
  • Loading branch information
Kyr Shatskyy committed Mar 15, 2020
1 parent fb29154 commit e536c8b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bootstrap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e
export LC_ALL=C
if [ $# -eq 0 ]; then
Expand All @@ -19,7 +19,13 @@ case "$(uname -s)" in
Linux)
case "$(lsb_release --id --short)" in
Ubuntu|Debian)
for package in qemu-utils python-dev libssl-dev python-pip python-virtualenv libev-dev libvirt-dev libmysqlclient-dev libffi-dev libyaml-dev ; do
# Ensure setuptools is installed
if [[ "$PYTHON" =~ "python2" ]]; then
deps=(qemu-utils python-dev libssl-dev python-pip python-virtualenv libev-dev libvirt-dev libmysqlclient-dev libffi-dev libyaml-dev)
else
deps=(qemu-utils python3-dev libssl-dev python-pip python3-virtualenv libev-dev libvirt-dev libmysqlclient-dev libffi-dev libyaml-dev)
fi
for package in ${deps[@]}; do
if [ "$(dpkg --status -- $package|sed -n 's/^Status: //p')" != "install ok installed" ]; then
# add a space after old values
missing="${missing:+$missing }$package"
Expand Down

0 comments on commit e536c8b

Please sign in to comment.