ensure pipenv uses python 3.11 on AL2023

This commit is contained in:
Lee Goolsbee
2023-05-17 15:43:42 -05:00
parent fd4d9b6469
commit 293dddcd2d
2 changed files with 4 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ set +a
pipenv run \
ansible-playbook -v \
$ATL_DEPLOYMENT_REPOSITORY_CUSTOM_PARAMS \
-e "ansible_python_interpreter=$(pipenv --venv)/bin/python" \
-e "${PLAYBOOK_INVOCATION_EXTRA_PARAMS}" \
-i $INV \
$PLAYBOOK \

View File

@@ -3,6 +3,7 @@
set -e
PIP_BIN="pip3"
PIPENV_PYTHON="3"
source /etc/os-release
if [[ $ID = "amzn" ]] && [[ $VERSION = "2" ]]; then
@@ -19,6 +20,7 @@ elif [[ $ID = "amzn" ]] && [[ $VERSION = "2023" ]]; then
python3.11-pip \
python3.11-devel
PIP_BIN="pip3.11"
PIPENV_PYTHON="3.11"
else
# FIXME: Currently assumes Debian-based
apt-get update && \
@@ -33,7 +35,7 @@ echo "Installing pipenv..."
$PIP_BIN install pipenv
echo "Installing ansible and dependencies..."
PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv sync 2>&1 | iconv -c -f utf-8 -t ascii
PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv --python $PIPENV_PYTHON sync 2>&1 | iconv -c -f utf-8 -t ascii
if [[ $1 == "--dev" ]]; then
pipenv sync --dev