Skip to content

Commit f72db17

Browse files
authored
Made env.var pythonLocation consistent for Python and PyPy (#418)
* Change find-pypy.ts to redefine pythonLocaction environment variable * Change README.md in order to add sentence about pythonLocation envvar * Change sentence about pythonLocation envvar in README.md * Rephrase the definition of pythonLocation env.var
1 parent 53e1529 commit f72db17

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ jobs:
151151
- run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version
152152
```
153153
154+
>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.
155+
154156
# Getting started with Python + Actions
155157

156158
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 for: dist/setup/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63993,7 +63993,7 @@ function findPyPyVersion(versionSpec, architecture) {
6399363993
const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : '';
6399463994
const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`);
6399563995
const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir);
63996-
core.exportVariable('pythonLocation', pythonLocation);
63996+
core.exportVariable('pythonLocation', installDir);
6399763997
core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig');
6399863998
core.addPath(pythonLocation);
6399963999
core.addPath(_binDir);

Diff for: src/find-pypy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export async function findPyPyVersion(
5454
`python${binaryExtension}`
5555
);
5656
const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir);
57-
core.exportVariable('pythonLocation', pythonLocation);
57+
core.exportVariable('pythonLocation', installDir);
5858
core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig');
5959
core.addPath(pythonLocation);
6060
core.addPath(_binDir);

0 commit comments

Comments
 (0)