mirror of
https://github.com/actions/setup-python.git
synced 2024-11-22 07:00:57 -05:00
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
This commit is contained in:
parent
53e15292cd
commit
f72db171ab
3 changed files with 4 additions and 2 deletions
|
@ -151,6 +151,8 @@ jobs:
|
||||||
- run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version
|
- 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
|
# 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).
|
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).
|
||||||
|
|
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
|
@ -63993,7 +63993,7 @@ function findPyPyVersion(versionSpec, architecture) {
|
||||||
const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : '';
|
const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : '';
|
||||||
const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`);
|
const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`);
|
||||||
const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir);
|
const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir);
|
||||||
core.exportVariable('pythonLocation', pythonLocation);
|
core.exportVariable('pythonLocation', installDir);
|
||||||
core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig');
|
core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig');
|
||||||
core.addPath(pythonLocation);
|
core.addPath(pythonLocation);
|
||||||
core.addPath(_binDir);
|
core.addPath(_binDir);
|
||||||
|
|
|
@ -54,7 +54,7 @@ export async function findPyPyVersion(
|
||||||
`python${binaryExtension}`
|
`python${binaryExtension}`
|
||||||
);
|
);
|
||||||
const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir);
|
const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir);
|
||||||
core.exportVariable('pythonLocation', pythonLocation);
|
core.exportVariable('pythonLocation', installDir);
|
||||||
core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig');
|
core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig');
|
||||||
core.addPath(pythonLocation);
|
core.addPath(pythonLocation);
|
||||||
core.addPath(_binDir);
|
core.addPath(_binDir);
|
||||||
|
|
Loading…
Reference in a new issue