mirror of
https://github.com/actions/setup-python.git
synced 2025-04-13 08:03:29 +00:00
Compare commits
4 Commits
6a092bac62
...
14fe370e3b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
14fe370e3b | ||
![]() |
e348410e00 | ||
![]() |
91b95c4e89 | ||
![]() |
5e5f66be2b |
2
.github/workflows/e2e-cache.yml
vendored
2
.github/workflows/e2e-cache.yml
vendored
@ -78,6 +78,8 @@ jobs:
|
||||
python-version: pypy-3.11-v7.x
|
||||
- os: ubuntu-22.04
|
||||
python-version: pypy-3.11-v7.x
|
||||
- os: ubuntu-22.04-arm
|
||||
python-version: pypy-3.10-v7.x
|
||||
- os: ubuntu-22.04-arm
|
||||
python-version: pypy-3.11-v7.x
|
||||
steps:
|
||||
|
1
.github/workflows/e2e-tests.yml
vendored
1
.github/workflows/e2e-tests.yml
vendored
@ -19,7 +19,6 @@ jobs:
|
||||
matrix:
|
||||
operating-system:
|
||||
[
|
||||
ubuntu-20.04,
|
||||
windows-latest,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
|
2
.github/workflows/test-graalpy.yml
vendored
2
.github/workflows/test-graalpy.yml
vendored
@ -21,7 +21,6 @@ jobs:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
@ -77,7 +76,6 @@ jobs:
|
||||
os:
|
||||
[
|
||||
macos-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
|
4
.github/workflows/test-pypy.yml
vendored
4
.github/workflows/test-pypy.yml
vendored
@ -24,7 +24,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
@ -142,7 +141,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
@ -177,7 +175,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
@ -220,7 +217,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
ubuntu-24.04-arm,
|
||||
|
8
.github/workflows/test-python.yml
vendored
8
.github/workflows/test-python.yml
vendored
@ -24,7 +24,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
@ -69,7 +68,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
@ -117,7 +115,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
@ -163,7 +160,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
@ -214,7 +210,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
@ -265,7 +260,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
@ -300,7 +294,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
@ -419,7 +412,6 @@ jobs:
|
||||
[
|
||||
macos-latest,
|
||||
windows-latest,
|
||||
ubuntu-20.04,
|
||||
ubuntu-22.04,
|
||||
ubuntu-22.04-arm,
|
||||
macos-13,
|
||||
|
22
dist/setup/index.js
vendored
22
dist/setup/index.js
vendored
@ -96158,24 +96158,28 @@ class PipCache extends cache_distributor_1.default {
|
||||
}
|
||||
getCacheGlobalDirectories() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let exitCode = 1;
|
||||
let exitCode = 0;
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
// Add temporary fix for Windows
|
||||
// On windows it is necessary to execute through an exec
|
||||
// because the getExecOutput gives a non zero code or writes to stderr for pip 22.0.2,
|
||||
// On Windows, it is necessary to execute through an exec
|
||||
// because the getExecOutput gives a non-zero code or writes to stderr for pip 22.0.2,
|
||||
// or spawn must be started with the shell option enabled for getExecOutput
|
||||
// Related issue: https://github.com/actions/setup-python/issues/328
|
||||
if (utils_1.IS_WINDOWS) {
|
||||
const execPromisify = util_1.default.promisify(child_process.exec);
|
||||
({ stdout: stdout, stderr: stderr } = yield execPromisify('pip cache dir'));
|
||||
try {
|
||||
({ stdout, stderr } = yield execPromisify('pip cache dir'));
|
||||
}
|
||||
catch (err) {
|
||||
// Pip outputs warnings to stderr (e.g., --no-python-version-warning flag deprecation warning), causing false failure detection
|
||||
// Related issue: https://github.com/actions/setup-python/issues/1034
|
||||
// If an error occurs, set exitCode to 1 to indicate failure
|
||||
exitCode = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
({
|
||||
stdout: stdout,
|
||||
stderr: stderr,
|
||||
exitCode: exitCode
|
||||
} = yield exec.getExecOutput('pip cache dir'));
|
||||
({ stdout, stderr, exitCode } = yield exec.getExecOutput('pip cache dir'));
|
||||
}
|
||||
if (exitCode && stderr) {
|
||||
throw new Error(`Could not get cache folder path for pip package manager`);
|
||||
|
@ -21,24 +21,27 @@ class PipCache extends CacheDistributor {
|
||||
}
|
||||
|
||||
protected async getCacheGlobalDirectories() {
|
||||
let exitCode = 1;
|
||||
let exitCode = 0;
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
|
||||
// Add temporary fix for Windows
|
||||
// On windows it is necessary to execute through an exec
|
||||
// because the getExecOutput gives a non zero code or writes to stderr for pip 22.0.2,
|
||||
// On Windows, it is necessary to execute through an exec
|
||||
// because the getExecOutput gives a non-zero code or writes to stderr for pip 22.0.2,
|
||||
// or spawn must be started with the shell option enabled for getExecOutput
|
||||
// Related issue: https://github.com/actions/setup-python/issues/328
|
||||
if (IS_WINDOWS) {
|
||||
const execPromisify = utils.promisify(child_process.exec);
|
||||
({stdout: stdout, stderr: stderr} = await execPromisify('pip cache dir'));
|
||||
try {
|
||||
({stdout, stderr} = await execPromisify('pip cache dir'));
|
||||
} catch (err) {
|
||||
// Pip outputs warnings to stderr (e.g., --no-python-version-warning flag deprecation warning), causing false failure detection
|
||||
// Related issue: https://github.com/actions/setup-python/issues/1034
|
||||
// If an error occurs, set exitCode to 1 to indicate failure
|
||||
exitCode = 1;
|
||||
}
|
||||
} else {
|
||||
({
|
||||
stdout: stdout,
|
||||
stderr: stderr,
|
||||
exitCode: exitCode
|
||||
} = await exec.getExecOutput('pip cache dir'));
|
||||
({stdout, stderr, exitCode} = await exec.getExecOutput('pip cache dir'));
|
||||
}
|
||||
|
||||
if (exitCode && stderr) {
|
||||
|
Loading…
Reference in New Issue
Block a user