#!/bin/bash -eux

# install sudo if it's missing
# probably means that we're running under local docker..
if ! which sudo; then
    apt update
    apt -y install sudo
fi

# compensate for differences between ubuntu:focal and github action image...

sudo apt -y install python3.8 python3.8-dev
sudo python3.8 -m pip install -U setuptools pip # ugh. otherwise find_namespace_packages is missing

# just in case? not sure if need anymore
sudo ln -sfT $(which python3.8) /usr/bin/python3

# otherwise setuptools don't work..
sudo apt -y install git

# jq wants it??
sudo apt -y install dh-autoreconf

sudo apt -y install python3-pip

# this is only necessary on gitlab CI apparently???
sudo apt -y install python3-setuptools
