From 65b071217a8539818fdb8b54561bcbae40380a54 Mon Sep 17 00:00:00 2001
From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com>
Date: Tue, 26 Aug 2025 08:21:55 +0530
Subject: [PATCH] Clarify pythonLocation behavior for PyPy and GraalPy in
environment variables (#1183)
* documentation update
* spaces update
---
docs/advanced-usage.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md
index 188fa9d6..9642392e 100644
--- a/docs/advanced-usage.md
+++ b/docs/advanced-usage.md
@@ -477,16 +477,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.
**Executable location by implementation:**
• **CPython** – `$pythonLocation/bin/python` (Linux/macOS), `$pythonLocation/python.exe` (Windows)
• **PyPy** – `$pythonLocation/bin/python` (Linux/macOS), `$pythonLocation/python.exe` (Windows)
• **GraalPy** – `$pythonLocation/bin/python` (Linux/macOS)
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