mirror of
https://github.com/actions/setup-python.git
synced 2025-04-19 19:33:29 +00:00
Allow python version bounds just with TOMLs
This commit is contained in:
parent
556ac3e0ad
commit
c4ab19b63a
7
.github/workflows/e2e-tests.yml
vendored
7
.github/workflows/e2e-tests.yml
vendored
@ -107,10 +107,3 @@ jobs:
|
||||
python-version: '>3.8'
|
||||
- name: Verify >3.8
|
||||
run: python __tests__/verify-python.py 3.11
|
||||
|
||||
- name: Run with setup-python >=3.8,<3.10
|
||||
uses: ./
|
||||
with:
|
||||
python-version: '>=3.8,<3.10'
|
||||
- name: Verify >=3.8,<3.10
|
||||
run: python __tests__/verify-python.py 3.9
|
||||
|
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
@ -69699,7 +69699,7 @@ function cacheDependencies(cache, pythonVersion) {
|
||||
}
|
||||
function resolveVersionInputFromDefaultFile() {
|
||||
const couples = [
|
||||
['.python-version', utils_1.getVersionInputFromPlainFile],
|
||||
['.python-version', utils_1.getVersionInputFromPlainFile]
|
||||
];
|
||||
for (const [versionFile, _fn] of couples) {
|
||||
utils_1.logWarning(`Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '${versionFile}' file.`);
|
||||
@ -69731,7 +69731,6 @@ function resolveVersionInput() {
|
||||
versions = resolveVersionInputFromDefaultFile();
|
||||
}
|
||||
}
|
||||
versions = Array.from(versions, version => version.split(',').join(' '));
|
||||
return versions;
|
||||
}
|
||||
function run() {
|
||||
@ -70019,7 +70018,7 @@ function getVersionInputFromTomlFile(versionFile) {
|
||||
versions.push(version);
|
||||
}
|
||||
core.info(`Extracted ${versions} from ${versionFile}`);
|
||||
return versions;
|
||||
return Array.from(versions, version => version.split(',').join(' '));
|
||||
}
|
||||
exports.getVersionInputFromTomlFile = getVersionInputFromTomlFile;
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ async function cacheDependencies(cache: string, pythonVersion: string) {
|
||||
|
||||
function resolveVersionInputFromDefaultFile(): string[] {
|
||||
const couples: [string, (versionFile: string) => string[]][] = [
|
||||
['.python-version', getVersionInputFromPlainFile],
|
||||
['.python-version', getVersionInputFromPlainFile]
|
||||
];
|
||||
for (const [versionFile, _fn] of couples) {
|
||||
logWarning(
|
||||
@ -68,7 +68,6 @@ function resolveVersionInput() {
|
||||
}
|
||||
}
|
||||
|
||||
versions = Array.from(versions, version => version.split(',').join(' '));
|
||||
return versions;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ export function getVersionInputFromTomlFile(versionFile: string): string[] {
|
||||
}
|
||||
|
||||
core.info(`Extracted ${versions} from ${versionFile}`);
|
||||
return versions;
|
||||
return Array.from(versions, version => version.split(',').join(' '));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user