mirror of
https://github.com/github/codeql-action.git
synced 2025-12-30 19:20:08 +08:00
Remove python dependency installation logic
I've left a few warning logging cases, but overall this feature is no longer supported.
This commit is contained in:
43
src/init.ts
43
src/init.ts
@@ -138,46 +138,3 @@ export async function checkInstallPython311(
|
||||
]).exec();
|
||||
}
|
||||
}
|
||||
|
||||
export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
|
||||
logger.startGroup("Setup Python dependencies");
|
||||
|
||||
const scriptsFolder = path.resolve(__dirname, "../python-setup");
|
||||
|
||||
try {
|
||||
if (process.platform === "win32") {
|
||||
await new toolrunner.ToolRunner(await safeWhich.safeWhich("powershell"), [
|
||||
path.join(scriptsFolder, "install_tools.ps1"),
|
||||
]).exec();
|
||||
} else {
|
||||
await new toolrunner.ToolRunner(
|
||||
path.join(scriptsFolder, "install_tools.sh"),
|
||||
).exec();
|
||||
}
|
||||
const script = "auto_install_packages.py";
|
||||
if (process.platform === "win32") {
|
||||
await new toolrunner.ToolRunner(await safeWhich.safeWhich("py"), [
|
||||
"-3",
|
||||
"-B",
|
||||
path.join(scriptsFolder, script),
|
||||
path.dirname(codeql.getPath()),
|
||||
]).exec();
|
||||
} else {
|
||||
await new toolrunner.ToolRunner(await safeWhich.safeWhich("python3"), [
|
||||
"-B",
|
||||
path.join(scriptsFolder, script),
|
||||
path.dirname(codeql.getPath()),
|
||||
]).exec();
|
||||
}
|
||||
} catch (e) {
|
||||
logger.endGroup();
|
||||
logger.warning(
|
||||
`An error occurred while trying to automatically install Python dependencies: ${e}\n` +
|
||||
"Please make sure any necessary dependencies are installed before calling the codeql-action/analyze " +
|
||||
"step, and add a 'setup-python-dependencies: false' argument to this step to disable our automatic " +
|
||||
"dependency installation and avoid this warning.",
|
||||
);
|
||||
return;
|
||||
}
|
||||
logger.endGroup();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user