mirror of
https://gitea.com/actions/setup-python.git
synced 2024-11-22 18:19:35 +01:00
added Scripts to PATH on Windows (#173)
Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
This commit is contained in:
parent
da8703fb23
commit
152ba7c4dd
2 changed files with 9 additions and 0 deletions
5
dist/index.js
vendored
5
dist/index.js
vendored
|
@ -6437,6 +6437,10 @@ function usePyPy(majorVersion, architecture) {
|
||||||
core.exportVariable('pythonLocation', pythonLocation);
|
core.exportVariable('pythonLocation', pythonLocation);
|
||||||
core.addPath(installDir);
|
core.addPath(installDir);
|
||||||
core.addPath(_binDir);
|
core.addPath(_binDir);
|
||||||
|
// Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
|
||||||
|
if (IS_WINDOWS) {
|
||||||
|
core.addPath(path.join(installDir, 'Scripts'));
|
||||||
|
}
|
||||||
const impl = 'pypy' + majorVersion.toString();
|
const impl = 'pypy' + majorVersion.toString();
|
||||||
core.setOutput('python-version', impl);
|
core.setOutput('python-version', impl);
|
||||||
return { impl: impl, version: versionFromPath(installDir) };
|
return { impl: impl, version: versionFromPath(installDir) };
|
||||||
|
@ -6515,6 +6519,7 @@ function findPythonVersion(version, architecture) {
|
||||||
case 'PYPY2':
|
case 'PYPY2':
|
||||||
return usePyPy('2', architecture);
|
return usePyPy('2', architecture);
|
||||||
case 'PYPY3':
|
case 'PYPY3':
|
||||||
|
// keep pypy3 pointing to 3.6 for backward compatibility
|
||||||
return usePyPy('3.6', architecture);
|
return usePyPy('3.6', architecture);
|
||||||
default:
|
default:
|
||||||
return yield useCpythonVersion(version, architecture);
|
return yield useCpythonVersion(version, architecture);
|
||||||
|
|
|
@ -80,6 +80,10 @@ function usePyPy(
|
||||||
|
|
||||||
core.addPath(installDir);
|
core.addPath(installDir);
|
||||||
core.addPath(_binDir);
|
core.addPath(_binDir);
|
||||||
|
// Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
|
||||||
|
if (IS_WINDOWS) {
|
||||||
|
core.addPath(path.join(installDir, 'Scripts'));
|
||||||
|
}
|
||||||
|
|
||||||
const impl = 'pypy' + majorVersion.toString();
|
const impl = 'pypy' + majorVersion.toString();
|
||||||
core.setOutput('python-version', impl);
|
core.setOutput('python-version', impl);
|
||||||
|
|
Loading…
Reference in a new issue