diff --git a/.github/actions/poetry_setup/action.yml b/.github/actions/poetry_setup/action.yml index f23dd7c..6955b82 100644 --- a/.github/actions/poetry_setup/action.yml +++ b/.github/actions/poetry_setup/action.yml @@ -53,8 +53,20 @@ runs: ~/.cache/pip key: pip-${{ runner.os }}-${{ runner.arch }}-py-${{ inputs.python-version }} - - run: pipx install poetry==${{ inputs.poetry-version }} --python python${{ inputs.python-version }} + - name: Update PyPI packages shell: bash + run: | + python -m pip install -U pip wheel + + # Python prior to 3.12 ships setuptools. Upgrade it if present. + if pip freeze --all | grep -q '^setuptools=='; then + python -m pip install -U setuptools + fi + + - name: Install Poetry + shell: bash + run: | + pip install poetry==${{ inputs.poetry-version }} - name: Check Poetry File shell: bash