Support installing packages from specific index with introduction of `uv`
Issue
PR #57 introduced uv as a replacement for pip for performance improvements, but uv doesn’t support configuring an extra-index-url the same way as pip via pip config set global.extra-index-url <url> so attempting to install a package from a private package index causes this action to fail without additional configuration from the user.
Effect
- id: install-from-pyproject-toml
if: ${{ inputs.pyproject-toml-path != '' }}
run: |
cd $(dirname ${{ inputs.pyproject-toml-path }})
uv pip install . <-- this change
shell: bash
In my use case, the above step results in the following error message when trying to install foo from private package index for project bar:
Using Python 3.10.X environment at: ***
× No solution found when resolving dependencies:
╰─▶ Because foo was not found in the package registry and bar==1.2.3
depends on foo>=2.1.1, we can conclude that bar==1.2.3 cannot
be used.
And because only bar==1.2.3 is available and you require bar,
we can conclude that your requirements are unsatisfiable.
I think the introduction of uv is useful for projects that support it, I'd love to see this action updated to support an input for index-url / extra-index-url and handle the logic for installing private packages with uv, or even guidance in the README on what configuration updates are required for users.