Skip to content

Commit 3aba93a

Browse files
committed
setup-python: Document new python-version behavior and env.pythonVersion
1 parent 794f725 commit 3aba93a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
- [Outputs](#outputs)
1414
- [`python-version`](#python-version-1)
1515
- [`python-path`](#python-path)
16+
- [Environment Variables](#environment-variables)
17+
- [`pythonVersion`](#pythonversion)
1618
- [`ni/python-actions/setup-poetry`](#nipython-actionssetup-poetry)
1719
- [Usage](#usage-1)
1820
- [Inputs](#inputs-1)
@@ -82,6 +84,12 @@ steps:
8284
key: venv-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
8385
```
8486

87+
`python-version` is unique across implementations (CPython vs. PyPy) and free-threaded builds:
88+
89+
- CPython: "3.13.4".
90+
- CPython with free-threading: "3.13.4t"
91+
- PyPy: "pypy3.11.11-v7.3.19"
92+
8593
#### `python-path`
8694

8795
`actions/setup-python` sets the `pythonLocation` environment variable to the **directory**
@@ -96,6 +104,13 @@ steps:
96104
- run: pipx install <package> --python ${{ steps.setup-python.outputs.python-version }}
97105
```
98106

107+
### Environment Variables
108+
109+
#### `pythonVersion`
110+
111+
This is the same as `outputs.python-version` and is mainly intended for use in
112+
`ni/python-actions/setup-poetry`.
113+
99114
## `ni/python-actions/setup-poetry`
100115

101116
The `setup-poetry` action installs Poetry, adds it to the PATH, and caches it to speed up

0 commit comments

Comments
 (0)