mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-03-14 22:26:58 +01:00
update the logic
This commit is contained in:
parent
baf938aaae
commit
1140d87ee4
2 changed files with 6 additions and 4 deletions
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
|
@ -99609,8 +99609,9 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest
|
|||
const version = path.basename(path.dirname(installDir));
|
||||
const major = semver.major(version);
|
||||
const minor = semver.minor(version);
|
||||
if (major >= 3 && (major > 3 || minor >= 10)) {
|
||||
const arch = architecture === 'x64' ? '64' : '32';
|
||||
if (parseFloat(version) >= 3.10 && architecture !== 'x64') {
|
||||
// For Python >= 3.10 and architecture!= 'x64', add the architecture-specific folder to the path
|
||||
const arch = architecture === '32';
|
||||
const userScriptsDir = path.join(process.env['APPDATA'] || '', 'Python', `Python${major}${minor}-${arch}`, // Add architecture-specific folder (e.g., Python310-64 or Python310-32)
|
||||
'Scripts');
|
||||
// Add the dynamically constructed path to the environment PATH variable
|
||||
|
|
|
@ -139,8 +139,9 @@ export async function useCpythonVersion(
|
|||
const major = semver.major(version);
|
||||
const minor = semver.minor(version);
|
||||
|
||||
if (major >= 3 && (major > 3 || minor >= 10)) {
|
||||
const arch = architecture === 'x64' ? '64' : '32';
|
||||
if (parseFloat(version) >= 3.10 && architecture !== 'x64') {
|
||||
// For Python >= 3.10 and architecture!= 'x64', add the architecture-specific folder to the path
|
||||
const arch = architecture === '32';
|
||||
|
||||
const userScriptsDir = path.join(
|
||||
process.env['APPDATA'] || '',
|
||||
|
|
Loading…
Add table
Reference in a new issue