ensure poetry version via install scripts (#19369)

* ensure poetry version via install scripts

* Update Setup-poetry.ps1
This commit is contained in:
Kyle Altendorf
2025-03-31 09:18:59 -05:00
committed by GitHub
parent efe797e6bb
commit 4cdf86f2c0
4 changed files with 13 additions and 13 deletions
+1 -4
View File
@@ -102,10 +102,7 @@ foreach ($extra in $extras)
$extras_cli += $extra
}
if (-not (Get-Item -ErrorAction SilentlyContinue ".penv/Scripts/poetry.exe").Exists)
{
./Setup-poetry.ps1 -pythonVersion "$pythonVersion"
}
./Setup-poetry.ps1 -pythonVersion "$pythonVersion"
.penv/Scripts/poetry env use $(py -"$pythonVersion" -c 'import sys; print(sys.executable)')
.penv/Scripts/poetry install @extras_cli
+6 -3
View File
@@ -6,7 +6,10 @@ param(
$ErrorActionPreference = "Stop"
py -$pythonVersion -m venv .penv
.penv/Scripts/python -m pip install --upgrade pip setuptools wheel
if (-not (Get-Item -ErrorAction SilentlyContinue ".penv/Scripts/").Exists)
{
py -$pythonVersion -m venv .penv
.penv/Scripts/python -m pip install --upgrade pip
}
# TODO: maybe make our own zipapp/shiv/pex of poetry and download that?
.penv/Scripts/python -m pip install --requirement requirements-poetry.txt
.penv/Scripts/python -m pip install --upgrade --requirement requirements-poetry.txt
+1 -3
View File
@@ -168,9 +168,7 @@ if [ "$OPENSSL_VERSION_INT" -lt "269488367" ]; then
echo "Your OS may have patched OpenSSL and not updated the version to 1.1.1n"
fi
if [ ! -f .penv/bin/poetry ]; then
./setup-poetry.sh -c "${INSTALL_PYTHON_PATH}"
fi
./setup-poetry.sh -c "${INSTALL_PYTHON_PATH}"
.penv/bin/poetry env use "${INSTALL_PYTHON_PATH}"
# shellcheck disable=SC2086
+5 -3
View File
@@ -30,7 +30,9 @@ while getopts c:h flag; do
esac
done
"$PYTHON_COMMAND" -m venv .penv
.penv/bin/python -m pip install --upgrade pip setuptools wheel
if [ ! -d .penv/bin/ ]; then
"$PYTHON_COMMAND" -m venv .penv
.penv/bin/python -m pip install --upgrade pip
fi
# TODO: maybe make our own zipapp/shiv/pex of poetry and download that?
.penv/bin/python -m pip install --requirement requirements-poetry.txt
.penv/bin/python -m pip install --upgrade --requirement requirements-poetry.txt