mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-09 04:42:20 +02:00
fix: 3.x-dev can install a 3.y version (#417)
* fix: 3.x-dev can install a 3.y version * Update README section for `-dev`
This commit is contained in:
parent
f72db171ab
commit
d09bd5e600
4 changed files with 35 additions and 17 deletions
11
dist/setup/index.js
vendored
11
dist/setup/index.js
vendored
|
@ -64183,15 +64183,10 @@ function useCpythonVersion(version, architecture) {
|
|||
});
|
||||
}
|
||||
exports.useCpythonVersion = useCpythonVersion;
|
||||
/** Convert versions like `3.8-dev` to a version like `>= 3.8.0-a0`. */
|
||||
/** Convert versions like `3.8-dev` to a version like `~3.8.0-0`. */
|
||||
function desugarDevVersion(versionSpec) {
|
||||
if (versionSpec.endsWith('-dev')) {
|
||||
const versionRoot = versionSpec.slice(0, -'-dev'.length);
|
||||
return `>= ${versionRoot}.0-a0`;
|
||||
}
|
||||
else {
|
||||
return versionSpec;
|
||||
}
|
||||
const devVersion = /^(\d+)\.(\d+)-dev$/;
|
||||
return versionSpec.replace(devVersion, '~$1.$2.0-0');
|
||||
}
|
||||
/** Extracts python version from install path from hosted tool cache as described in README.md */
|
||||
function versionFromPath(installDir) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue