8000 added action output python-install-dir · arBmind/setup-python@7a53768 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a53768

Browse files
committed
added action output python-install-dir
* also fixed export of python-version for pypy installs
1 parent f382193 commit 7a53768

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ inputs:
1919
outputs:
2020
python-version:
2121
description: "The installed python version. Useful when given a version range as input."
22+
python-install-dir:
23+
description: "The path where python was installed. (PYTHON_INSTALL_DIR)"
2224
runs:
2325
using: 'node12'
2426
main: 'dist/setup/index.js'

src/find-pypy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ export async function findPyPyVersion(
5353
core.addPath(pythonLocation);
5454
core.addPath(_binDir);
5555

56+
core.setOutput('python-version', resolvedPythonVersion);
57+
core.setOutput('python-install-dir', installDir);
58+
5659
return {resolvedPyPyVersion, resolvedPythonVersion};
5760
}
5861

src/find-python.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ function usePyPy(
7171

7272
const impl = 'pypy' + majorVersion.toString();
7373
core.setOutput('python-version', impl);
74+
core.setOutput('python-install-dir', installDir);
7475

7576
return {impl: impl, version: versionFromPath(installDir)};
7677
}
@@ -150,6 +151,7 @@ async function useCpythonVersion(
150151

151152
const installed = versionFromPath(installDir);
152153
core.setOutput('python-version', installed);
154+
core.setOutput('python-install-dir', installDir);
153155

154156
return {impl: 'CPython', version: installed};
155157
}

0 commit comments

Comments
 (0)
0