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

Function getUvBinaryForBundling

packages/python/src/uv.ts:480–497  ·  view source on GitHub ↗
(
  pythonPath: string
)

Source from the content-addressed store, hash-verified

478 * @throws Error if uv binary cannot be found
479 */
480export async function getUvBinaryForBundling(
481 pythonPath: string
482): Promise<string> {
483 const uvPath = await findUvBinary(pythonPath);
484 if (!uvPath) {
485 throw new Error(
486 'Cannot find uv binary for bundling. ' +
487 'Ensure uv is installed and available in PATH.'
488 );
489 }
490
491 // Resolve symlinks to get the actual binary path.
492 // This is important because in Vercel's build container,
493 // /usr/local/bin/uv is a symlink to /uv/uv. If we don't resolve it,
494 // the Lambda will contain a symlink rather than the actual binary.
495 const resolvedPath = await fs.promises.realpath(uvPath);
496 return resolvedPath;
497}
498
499export const UV_LINUX_TARGET = 'x86_64-unknown-linux-gnu';
500

Callers 1

Calls 1

findUvBinaryFunction · 0.85

Tested by

no test coverage detected