mirror of
https://github.com/actions/setup-python
synced 2025-04-07 07:49:45 +00:00
Create missing pypyX.Y
symlinks (#347)
`pypyX.Y.exe` executables are missing from PyPy archives on Windows before v7.3.9 (X.Y < 3.9) `pypy2.7` symlinks are also missing from macOS/Linux PyPy archives before v7.3.9 relates to #346
This commit is contained in:
@ -98,7 +98,9 @@ async function createPyPySymlink(
|
||||
) {
|
||||
const version = semver.coerce(pythonVersion)!;
|
||||
const pythonBinaryPostfix = semver.major(version);
|
||||
const pythonMinor = semver.minor(version);
|
||||
const pypyBinaryPostfix = pythonBinaryPostfix === 2 ? '' : '3';
|
||||
const pypyMajorMinorBinaryPostfix = `${pythonBinaryPostfix}.${pythonMinor}`;
|
||||
let binaryExtension = IS_WINDOWS ? '.exe' : '';
|
||||
|
||||
core.info('Creating symlinks...');
|
||||
@ -115,6 +117,13 @@ async function createPyPySymlink(
|
||||
`python${binaryExtension}`,
|
||||
true
|
||||
);
|
||||
|
||||
createSymlinkInFolder(
|
||||
pypyBinaryPath,
|
||||
`pypy${pypyBinaryPostfix}${binaryExtension}`,
|
||||
`pypy${pypyMajorMinorBinaryPostfix}${binaryExtension}`,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
async function installPip(pythonLocation: string) {
|
||||
|
Reference in New Issue
Block a user