Skip to content

Clarify pythonLocation behavior for PyPy and GraalPy in environment variables #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,16 +468,16 @@ jobs:
- run: echo '${{ steps.cp313.outputs.cache-hit }}' # true if cache-hit occurred on the primary key
```

## Environment variables
### Environment variables

These environment variables become available after setup-python action execution:

| **Env.variable** | **Description** |
| ----------- | ----------- |
| pythonLocation |Contains the absolute path to the folder where the requested version of Python or PyPy is installed|
| Python_ROOT_DIR | https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython |
| Python2_ROOT_DIR |https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2|
| Python3_ROOT_DIR |https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3|
| Env. variable | Description |
|----------------------|-------------|
| `pythonLocation` | Contains the absolute path to the folder where the requested version of Python, PyPy, or GraalPy is installed. <br><br>**Executable location by implementation:** <br>• **CPython** – `$pythonLocation/bin/python` (Linux/macOS), `$pythonLocation/python.exe` (Windows) <br>• **PyPy** – `$pythonLocation/bin/python` (Linux/macOS), `$pythonLocation/python.exe` (Windows) <br>• **GraalPy** – `$pythonLocation/bin/python` (Linux/macOS) <br><br>Note: CPython versions include a symlink or copy of the Python executable at the root, while PyPy and GraalPy retain upstream directory layouts. |
| `Python_ROOT_DIR` | https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython |
| `Python2_ROOT_DIR` | https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2 |
| `Python3_ROOT_DIR` | https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3 |

## Using `update-environment` flag

Expand Down