setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

Enhance reading from .python-version

Open krystof-k opened this issue 1 year ago • 1 comments

Enhance reading from .python-version file, matching the Pyenv behavior:

  • resolves multiple versions from multiple lines
  • handles pyenv-virtualenv pointers (e.g. 3.10/envs/virtualenv) (see pyenv/pyenv-virtualenv#472)
  • ignores empty lines and lines starting with #
  • trims whitespace

Closes #734 and supersedes #647.

Check list:

  • [x] Mark if documentation changes are required.
  • [x] Mark if tests were added or updated to cover the changes.

krystof-k avatar Jan 03 '24 23:01 krystof-k

steps:

  • uses: actions/checkout@v4
  • uses: actions/setup-python@v4 with: python-version: 'graalpy-22.3'
  • run: python my_script.py

maruthiaws0808 avatar Feb 20 '24 10:02 maruthiaws0808