mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-09 12:52:20 +02:00
feature: add a python-path
output
Expose a `python-path` output containing the chosen Python executable path.
This commit is contained in:
parent
fff15a21cc
commit
ff706563d7
9 changed files with 84 additions and 4 deletions
|
@ -48,12 +48,18 @@ export async function findPyPyVersion(
|
|||
|
||||
const pipDir = IS_WINDOWS ? 'Scripts' : 'bin';
|
||||
const _binDir = path.join(installDir, pipDir);
|
||||
const binaryExtension = IS_WINDOWS ? '.exe' : '';
|
||||
const pythonPath = path.join(
|
||||
IS_WINDOWS ? installDir : _binDir,
|
||||
`python${binaryExtension}`
|
||||
);
|
||||
const pythonLocation = pypyInstall.getPyPyBinaryPath(installDir);
|
||||
core.exportVariable('pythonLocation', pythonLocation);
|
||||
core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig');
|
||||
core.addPath(pythonLocation);
|
||||
core.addPath(_binDir);
|
||||
core.setOutput('python-version', 'pypy' + resolvedPyPyVersion.trim());
|
||||
core.setOutput('python-path', pythonPath);
|
||||
|
||||
return {resolvedPyPyVersion, resolvedPythonVersion};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue