diff --git a/README.md b/README.md index 7508d353c..56103e541 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,8 @@ jobs: - run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version ``` +>The environment variable `pythonLocation` also becomes available after Python or PyPy installation. It contains the absolute path to the folder where the desired version of Python or PyPy is installed. + # Getting started with Python + Actions Check out our detailed guide on using [Python with GitHub Actions](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-python-with-github-actions). diff --git a/dist/setup/index.js b/dist/setup/index.js index 9ab89d404..7e2673395 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -63993,7 +63993,7 @@ function findPyPyVersion(versionSpec, architecture) { const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir); - core.exportVariable('pythonLocation', pythonLocation); + core.exportVariable('pythonLocation', installDir); core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig'); core.addPath(pythonLocation); core.addPath(_binDir); diff --git a/src/find-pypy.ts b/src/find-pypy.ts index 1008ed6ea..630d685ca 100644 --- a/src/find-pypy.ts +++ b/src/find-pypy.ts @@ -54,7 +54,7 @@ export async function findPyPyVersion( `python${binaryExtension}` ); const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir); - core.exportVariable('pythonLocation', pythonLocation); + core.exportVariable('pythonLocation', installDir); core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig'); core.addPath(pythonLocation); core.addPath(_binDir);