Add 't' suffix to python-version output

This commit is contained in:
Sam Gross 2025-02-05 21:06:09 +00:00
parent 3794e54127
commit 1ec1b0d2bd
2 changed files with 12 additions and 2 deletions

7
dist/setup/index.js vendored
View File

@ -91118,7 +91118,12 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest
// On Linux and macOS, pip will create the --user directory and add it to PATH as needed. // On Linux and macOS, pip will create the --user directory and add it to PATH as needed.
} }
const installed = versionFromPath(installDir); const installed = versionFromPath(installDir);
core.setOutput('python-version', installed); let pythonVersion = installed;
if (freethreaded) {
// Add the freethreaded suffix to the version (e.g., 3.13.1t)
pythonVersion += 't';
}
core.setOutput('python-version', pythonVersion);
core.setOutput('python-path', pythonPath); core.setOutput('python-path', pythonPath);
return { impl: 'CPython', version: installed }; return { impl: 'CPython', version: installed };
}); });

View File

@ -165,7 +165,12 @@ export async function useCpythonVersion(
} }
const installed = versionFromPath(installDir); const installed = versionFromPath(installDir);
core.setOutput('python-version', installed); let pythonVersion = installed;
if (freethreaded) {
// Add the freethreaded suffix to the version (e.g., 3.13.1t)
pythonVersion += 't';
}
core.setOutput('python-version', pythonVersion);
core.setOutput('python-path', pythonPath); core.setOutput('python-path', pythonPath);
return {impl: 'CPython', version: installed}; return {impl: 'CPython', version: installed};