From 22678cd5c8042310e6070bbcb40e503340dedb72 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Tue, 31 May 2022 16:44:00 +0200 Subject: [PATCH 1/4] Change find-pypy.ts to redefine pythonLocaction environment variable --- dist/setup/index.js | 2 +- src/find-pypy.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 60ad85859..2eefa24a0 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); From 0d36a4dae94d4055e685b380053fb99e97c7f37c Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Wed, 1 Jun 2022 10:37:19 +0200 Subject: [PATCH 2/4] Change README.md in order to add sentence about pythonLocation envvar --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7508d353c..81bf78c69 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,8 @@ jobs: - run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version ``` +>After finishing the action environment variable `pythonLocation` becomes available. It contains the 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). From baba4c5708cd734fc072d1570b44f50a4e3bf4ab Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Wed, 1 Jun 2022 10:45:10 +0200 Subject: [PATCH 3/4] Change sentence about pythonLocation envvar in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 81bf78c69..3d4080a98 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ jobs: - run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version ``` ->After finishing the action environment variable `pythonLocation` becomes available. It contains the path to the folder where the desired version of Python or PyPy is installed. +>After finishing the action environment variable `pythonLocation` also becomes available. It contains the absolute path to the folder where the desired version of Python or PyPy is installed. # Getting started with Python + Actions From 1bd000c7b822f75d1068057f285ac8a1379cf602 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Wed, 1 Jun 2022 12:12:49 +0200 Subject: [PATCH 4/4] Rephrase the definition of pythonLocation env.var --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d4080a98..56103e541 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ jobs: - run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version ``` ->After finishing the action environment variable `pythonLocation` also becomes available. It contains the absolute path to the folder where the desired version of Python or PyPy is installed. +>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