8000 resolve conflicts · aparnajyothi-y/setup-python@c614f62 · GitHub
[go: up one dir, main page]

Skip to content

Commit c614f62

Browse files
resolve conflicts
1 parent 114b468 commit c614f62

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/test-python-freethreaded.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ jobs:
100100
os:
101101
[
102102
macos-latest,
103+
windows-latest,
103104
ubuntu-22.04,
104105
ubuntu-22.04-arm,
105106
macos-13,

dist/setup/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96884,6 +96884,8 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest
9688496884
core.addPath(_binDir);
9688596885
if (utils_1.IS_WINDOWS) {
9688696886
// Add --user directory
96887+
// `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python/<semantic version>/x64/
96888+
// So if `findLocalTool` succeeded above, we must have a conformant `installDir`// Add --user directory
9688796889
const version = path.basename(path.dirname(installDir));
9688896890
const major = semver.major(version);
9688996891
const minor = semver.minor(version);
@@ -96895,11 +96897,10 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest
9689596897
core.addPath(userScriptsDir);
9689696898
}
9689796899
else {
96898-
// For Python >= 3.10 and architecture 'x64', or other versions, use the default user path
9689996900
const userScriptsDir = path.join(process.env['APPDATA'] || '', 'Python', `Python${major}${minor}`, 'Scripts');
9690096901
core.addPath(userScriptsDir);
9690196902
}
96902-
// Dynamically handle case for Python314t
96903+
// for free-freethreaded versions, add the freethreaded scripts directory
9690396904
const pythonPath = path.join(process.env['APPDATA'] || '', 'Python', `Python${major}${minor}t`, 'Scripts');
9690496905
core.addPath(pythonPath);
9690596906
}

src/find-python.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ export async function useCpythonVersion(
153153

154154
if (IS_WINDOWS) {
155155
// Add --user directory
156+
// `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python/<semantic version>/x64/
157+
// So if `findLocalTool` succeeded above, we must have a conformant `installDir`// Add --user directory
156158
const version = path.basename(path.dirname(installDir));
157159
const major = semver.major(version);
158160
const minor = semver.minor(version);
@@ -172,7 +174,6 @@ export async function useCpythonVersion(
172174
);
173175
core.addPath(userScriptsDir);
174176
} else {
175-
// For Python >= 3.10 and architecture 'x64', or other versions, use the default user path
176177
const userScriptsDir = path.join(
177178
process.env['APPDATA'] || '',
178179
'Python',
@@ -182,7 +183,7 @@ export async function useCpythonVersion(
182183
core.addPath(userScriptsDir);
183184
}
184185

185-
// Dynamically handle case for Python314t
186+
// for free-freethreaded versions, add the freethreaded scripts directory
186187
const pythonPath = path.join(
187188
process.env['APPDATA'] || '',
188189
'Python',

0 commit comments

Comments
 (0)
0