mirror of
https://github.com/actions/setup-python.git
synced 2025-06-08 14:37:00 +09:00
update the logic to allow x86-freethreaded, arm64-freethreaded, x64-freethreaded inputs also
This commit is contained in:
parent
3d7ca5fea2
commit
9d11fda211
2 changed files with 11 additions and 0 deletions
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
|
@ -96887,6 +96887,8 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest
|
||||||
const version = path.basename(path.dirname(installDir));
|
const version = path.basename(path.dirname(installDir));
|
||||||
const major = semver.major(version);
|
const major = semver.major(version);
|
||||||
const minor = semver.minor(version);
|
const minor = semver.minor(version);
|
||||||
|
const freethreadedInput = core.getInput('freethreaded');
|
||||||
|
const freethreaded = freethreadedInput === 'true' || architecture.includes('freethreaded');
|
||||||
const basePath = process.env['APPDATA'] || '';
|
const basePath = process.env['APPDATA'] || '';
|
||||||
let versionSuffix = `${major}${minor}`;
|
let versionSuffix = `${major}${minor}`;
|
||||||
// Append '-32' for x86 architecture if Python version is >= 3.10
|
// Append '-32' for x86 architecture if Python version is >= 3.10
|
||||||
|
@ -96906,6 +96908,9 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest
|
||||||
else if (architecture === 'arm64-freethreaded') {
|
else if (architecture === 'arm64-freethreaded') {
|
||||||
versionSuffix += '-arm64';
|
versionSuffix += '-arm64';
|
||||||
}
|
}
|
||||||
|
else if (architecture === 'x64-freethreaded') {
|
||||||
|
versionSuffix += '-64';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Add user Scripts path
|
// Add user Scripts path
|
||||||
const userScriptsDir = path.join(basePath, 'Python', `Python${versionSuffix}`, 'Scripts');
|
const userScriptsDir = path.join(basePath, 'Python', `Python${versionSuffix}`, 'Scripts');
|
||||||
|
|
|
@ -156,6 +156,10 @@ export async function useCpythonVersion(
|
||||||
const version = path.basename(path.dirname(installDir));
|
const version = path.basename(path.dirname(installDir));
|
||||||
const major = semver.major(version);
|
const major = semver.major(version);
|
||||||
const minor = semver.minor(version);
|
const minor = semver.minor(version);
|
||||||
|
const freethreadedInput = core.getInput('freethreaded');
|
||||||
|
const freethreaded =
|
||||||
|
freethreadedInput === 'true' || architecture.includes('freethreaded');
|
||||||
|
|
||||||
const basePath = process.env['APPDATA'] || '';
|
const basePath = process.env['APPDATA'] || '';
|
||||||
let versionSuffix = `${major}${minor}`;
|
let versionSuffix = `${major}${minor}`;
|
||||||
// Append '-32' for x86 architecture if Python version is >= 3.10
|
// Append '-32' for x86 architecture if Python version is >= 3.10
|
||||||
|
@ -174,6 +178,8 @@ export async function useCpythonVersion(
|
||||||
versionSuffix += '-32';
|
versionSuffix += '-32';
|
||||||
} else if (architecture === 'arm64-freethreaded') {
|
} else if (architecture === 'arm64-freethreaded') {
|
||||||
versionSuffix += '-arm64';
|
versionSuffix += '-arm64';
|
||||||
|
} else if (architecture === 'x64-freethreaded') {
|
||||||
|
versionSuffix += '-64';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Add user Scripts path
|
// Add user Scripts path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue