MCPcopy Create free account
hub / github.com/vercel/vercel / shouldUseCompileAll

Function shouldUseCompileAll

packages/python/src/compileall.ts:21–37  ·  view source on GitHub ↗
({
  isDev,
  hasCustomCommand,
  hasCustomBuildCommand,
}: {
  isDev?: boolean;
  hasCustomCommand: boolean;
  hasCustomBuildCommand: boolean;
})

Source from the content-addressed store, hash-verified

19}
20
21export function shouldUseCompileAll({
22 isDev,
23 hasCustomCommand,
24 hasCustomBuildCommand,
25}: {
26 isDev?: boolean;
27 hasCustomCommand: boolean;
28 hasCustomBuildCommand: boolean;
29}): boolean {
30 if (isDev) return false;
31
32 // Custom install or build commands never get compileall: they may produce
33 // their own bytecode or bypass the venv layout compileall assumes.
34 if (hasCustomCommand || hasCustomBuildCommand) return false;
35
36 return isCompileAllEnabled();
37}
38
39interface CompileAllOptions {
40 /** Path to the venv Python binary (e.g. from getVenvPythonBin). */

Callers 2

compileall.test.tsFile · 0.90
buildFunction · 0.90

Calls 1

isCompileAllEnabledFunction · 0.85

Tested by

no test coverage detected