({
isDev,
hasCustomCommand,
hasCustomBuildCommand,
}: {
isDev?: boolean;
hasCustomCommand: boolean;
hasCustomBuildCommand: boolean;
})
| 19 | } |
| 20 | |
| 21 | export 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 | |
| 39 | interface CompileAllOptions { |
| 40 | /** Path to the venv Python binary (e.g. from getVenvPythonBin). */ |
no test coverage detected