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

Function areRequirementsInstalled

packages/python/src/install.ts:76–95  ·  view source on GitHub ↗
(
  pythonPath: string,
  requirementsPath: string,
  cwd: string
)

Source from the content-addressed store, hash-verified

74`;
75
76async 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
97async function getSitePackagesDirs(pythonBin: string): Promise<string[]> {
98 // Ask the venv's interpreter which directories it adds to sys.path for pure

Callers 1

installRequirementsFileFunction · 0.85

Calls 3

execaFunction · 0.85
resolveVendorDirFunction · 0.85

Tested by

no test coverage detected