mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 07:22:14 +00:00
added action output python-install-dir
* also fixed export of python-version for pypy installs
This commit is contained in:
parent
f382193329
commit
7a537682ef
3 changed files with 7 additions and 0 deletions
|
@ -19,6 +19,8 @@ inputs:
|
|||
outputs:
|
||||
python-version:
|
||||
description: "The installed python version. Useful when given a version range as input."
|
||||
python-install-dir:
|
||||
description: "The path where python was installed. (PYTHON_INSTALL_DIR)"
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/setup/index.js'
|
||||
|
|
|
@ -53,6 +53,9 @@ export async function findPyPyVersion(
|
|||
core.addPath(pythonLocation);
|
||||
core.addPath(_binDir);
|
||||
|
||||
core.setOutput('python-version', resolvedPythonVersion);
|
||||
core.setOutput('python-install-dir', installDir);
|
||||
|
||||
return {resolvedPyPyVersion, resolvedPythonVersion};
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ function usePyPy(
|
|||
|
||||
const impl = 'pypy' + majorVersion.toString();
|
||||
core.setOutput('python-version', impl);
|
||||
core.setOutput('python-install-dir', installDir);
|
||||
|
||||
return {impl: impl, version: versionFromPath(installDir)};
|
||||
}
|
||||
|
@ -150,6 +151,7 @@ async function useCpythonVersion(
|
|||
|
||||
const installed = versionFromPath(installDir);
|
||||
core.setOutput('python-version', installed);
|
||||
core.setOutput('python-install-dir', installDir);
|
||||
|
||||
return {impl: 'CPython', version: installed};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue