( pythonPath: string, requirementsPath: string, cwd: string )
| 74 | `; |
| 75 | |
| 76 | async function areRequirementsInstalled( |
| 77 | pythonPath: string, |
| 78 | requirementsPath: string, |
| 79 | cwd: string |
| 80 | ) { |
| 81 | try { |
| 82 | await execa( |
| 83 | pythonPath, |
| 84 | ['-c', makeRequirementsCheckCode(requirementsPath)], |
| 85 | { |
| 86 | stdio: 'pipe', |
| 87 | cwd, |
| 88 | env: { ...process.env, PYTHONPATH: join(cwd, resolveVendorDir()) }, |
| 89 | } |
| 90 | ); |
| 91 | return true; |
| 92 | } catch (_err) { |
| 93 | return false; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | async function getSitePackagesDirs(pythonBin: string): Promise<string[]> { |
| 98 | // Ask the venv's interpreter which directories it adds to sys.path for pure |
no test coverage detected