Skip to content

Commit 5692a92

Browse files
committed
fix: update setup-python
1 parent ba38187 commit 5692a92

9 files changed

+70
-48
lines changed

dist/actions_python.678f52ec.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions_python.678f52ec.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions_python.f691d232.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/actions_python.f691d232.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"msvc-dev-cmd": "github:aminya/msvc-dev-cmd#9f672c1",
4444
"numerous": "1.0.3",
4545
"semver": "7.3.7",
46-
"setup-python": "github:actions/setup-python#v4.0.0",
46+
"setup-python": "github:actions/setup-python#ffcd00020c213885323d35524aa155f17870b8dd",
4747
"time-delta": "github:aminya/time-delta#69d91a41cef28e569be9a2991129f5f7d1f0d00e",
4848
"ubuntu-version": "^2.0.0",
4949
"untildify": "^4.0.0",

pnpm-lock.yaml

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/python/actions_python.ts

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,48 @@ import { isGitHubCI } from "../utils/env/isci"
88
import { cacheDependencies } from "./actions_cache"
99

1010
function isPyPyVersion(versionSpec: string) {
11-
return versionSpec.startsWith("pypy-")
11+
return versionSpec.startsWith("pypy")
1212
}
1313

14+
// function resolveVersionInput(version: string): string {
15+
// let versionFile = getInput("python-version-file")
16+
17+
// if (version && versionFile) {
18+
// warning("Both python-version and python-version-file inputs are specified, only python-version will be used")
19+
// }
20+
21+
// if (version) {
22+
// return version
23+
// }
24+
25+
// versionFile = versionFile || ".python-version"
26+
// if (!existsSync(versionFile)) {
27+
// throw new Error(`The specified python version file at: ${versionFile} does not exist`)
28+
// }
29+
// version = readFileSync(versionFile, "utf8")
30+
// info(`Resolved ${versionFile} as ${version}`)
31+
32+
// return version
33+
// }
34+
1435
export async function setupActionsPython(version: string, _setupDir: string, arch: string) {
1536
if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
16-
debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env.AGENT_TOOLSDIRECTORY}`)
17-
process.env.RUNNER_TOOL_CACHE = process.env.AGENT_TOOLSDIRECTORY
37+
debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env["AGENT_TOOLSDIRECTORY"]}`)
38+
process.env["RUNNER_TOOL_CACHE"] = process.env["AGENT_TOOLSDIRECTORY"]
1839
} else {
19-
debug(`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env.RUNNER_TOOL_CACHE}`)
40+
debug(`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env["RUNNER_TOOL_CACHE"]}`)
2041
}
42+
// const version = resolveVersionInput(versionGiven)
2143
if (version) {
2244
let pythonVersion: string
2345
if (isPyPyVersion(version)) {
2446
const installed = await findPyPyVersion(version, arch)
2547
pythonVersion = `${installed.resolvedPyPyVersion}-${installed.resolvedPythonVersion}`
26-
info(`Successfully setup PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})`)
48+
info(`Successfully set up PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})`)
2749
} else {
2850
const installed = await useCpythonVersion(version, arch)
2951
pythonVersion = installed.version
30-
info(`Successfully setup ${installed.impl} (${pythonVersion})`)
52+
info(`Successfully set up ${installed.impl} (${pythonVersion})`)
3153
}
3254

3355
const cache = "pip" // core.getInput("cache") // package manager used for caching

0 commit comments

Comments
 (0)