2022-01-11 19:06:06 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-05-28 04:10:48 +01:00
|
|
|
PYTHON="${PYTHON:=python3}"
|
|
|
|
PYTHON_DEP="${PYTHON_DEP:=python3}"
|
2022-09-15 05:03:24 +01:00
|
|
|
|
|
|
|
# install pre-reqs using yum/apt
|
2022-09-15 06:43:33 +01:00
|
|
|
if [ -z "${NO_SYSTEM}" ]; then
|
2022-09-15 05:03:24 +01:00
|
|
|
if command -v apt &> /dev/null
|
|
|
|
then
|
|
|
|
echo "setup to install CORE using apt"
|
|
|
|
sudo apt install -y ${PYTHON_DEP}-pip ${PYTHON_DEP}-venv
|
|
|
|
elif command -v yum &> /dev/null
|
|
|
|
then
|
|
|
|
echo "setup to install CORE using yum"
|
|
|
|
sudo yum install -y ${PYTHON_DEP}-pip
|
|
|
|
else
|
|
|
|
echo "apt/yum was not found"
|
|
|
|
echo "install python3, pip, venv, pipx, and invoke to run the automated install"
|
|
|
|
exit 1
|
|
|
|
fi
|
2022-01-11 19:06:06 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# install tooling for invoke based installation
|
2022-05-28 04:10:48 +01:00
|
|
|
${PYTHON} -m pip install --user pipx==0.16.4
|
|
|
|
${PYTHON} -m pipx ensurepath
|
2022-01-11 19:06:06 +00:00
|
|
|
export PATH=$PATH:~/.local/bin
|
|
|
|
pipx install invoke==1.4.1
|
2022-10-14 16:43:12 +01:00
|
|
|
pipx install poetry==1.2.1
|