al2023 ships with rpm-installed versions of setuptools and distlib that aren't removable and older than what pipenv requires; use py3.11 instead

This commit is contained in:
Lee Goolsbee
2023-05-16 16:16:24 -05:00
parent 65ba5e746a
commit 7baea6b580

View File

@@ -2,6 +2,8 @@
set -e set -e
PIP_BIN="pip3"
source /etc/os-release source /etc/os-release
if [[ $ID = "amzn" ]] && [[ $VERSION = "2" ]]; then if [[ $ID = "amzn" ]] && [[ $VERSION = "2" ]]; then
amazon-linux-extras enable python3.8 amazon-linux-extras enable python3.8
@@ -13,9 +15,10 @@ if [[ $ID = "amzn" ]] && [[ $VERSION = "2" ]]; then
python38-devel python38-devel
elif [[ $ID = "amzn" ]] && [[ $VERSION = "2023" ]]; then elif [[ $ID = "amzn" ]] && [[ $VERSION = "2023" ]]; then
dnf install -y \ dnf install -y \
python3 \ python3.11 \
python3-pip \ python3.11-pip \
python3-devel python3.11-devel
PIP_BIN="pip3.11"
else else
# FIXME: Currently assumes Debian-based # FIXME: Currently assumes Debian-based
apt-get update && \ apt-get update && \
@@ -27,7 +30,7 @@ export PATH=/usr/local/bin:$PATH
export PIP_DEFAULT_TIMEOUT=60 export PIP_DEFAULT_TIMEOUT=60
echo "Installing pipenv..." echo "Installing pipenv..."
pip3 install pipenv $PIP_BIN install pipenv
echo "Installing ansible and dependencies..." 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 sync 2>&1 | iconv -c -f utf-8 -t ascii