make install.sh work on systems withou pip

This commit is contained in:
Andreas Wrede
2026-04-12 14:16:44 -04:00
parent 1366c69cdc
commit fb8e27825d
+6 -3
View File
@@ -35,7 +35,6 @@ else
done
venv="~/venvs"
fi
python3 -m pip --version > /dev/null 2>&1 || { echo "pip is not installed, please install pip for python3"; exit 1; }
if [ "$what" = "server" ]; then
echo "Installing heartbeat server (hbd)"
@@ -45,10 +44,14 @@ else
fi
if [ ! -d $venv/hbd ]; then
mkdir -p $venv
python3 -m venv $venv/hbd --system-site-packages
python3 -m venv $venv/hbd --system-site-packages --without-pip
. $venv/hbd/bin/activate
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py
deactivate
# python3 -m pip --version > /dev/null 2>&1 || { echo "pip is not installed, please install pip for python3"; exit 1; }
fi
. $venv/hbd/bin/activate
pip install --index-url https://git.wrede.ca/api/packages/andreas/pypi/simple/ --extra-index-url https://pypi.org/simple hbd[$what]
pip install --upgrade --index-url https://git.wrede.ca/api/packages/andreas/pypi/simple/ --extra-index-url https://pypi.org/simple hbd[$what]
if [ "$what" = "server" ]; then
rm -f ~$where/hbd
ln -sf $(which hbd) $where/hbd