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

Function getTargetPlatform

packages/python/src/index.ts:390–404  ·  view source on GitHub ↗

Resolve the target platform for wheel resolution and Lambda architecture.

(isDev: boolean)

Source from the content-addressed store, hash-verified

388
389/** Resolve the target platform for wheel resolution and Lambda architecture. */
390function getTargetPlatform(isDev: boolean): TargetPlatform {
391 const arch = process.env.VERCEL_BUILD_ARCH;
392 if (arch) {
393 return {
394 uvPlatform: archToUvPlatform(arch),
395 architecture: archToLambdaArch(arch),
396 };
397 }
398
399 if (isDev || process.env.VERCEL_BUILD_IMAGE) {
400 return { uvPlatform: undefined, architecture: undefined };
401 }
402
403 return { uvPlatform: UV_LINUX_TARGET, architecture: 'x86_64' };
404}
405
406async function getPythonLambdaOptions({
407 config,

Callers 1

buildFunction · 0.85

Calls 2

archToUvPlatformFunction · 0.85
archToLambdaArchFunction · 0.85

Tested by

no test coverage detected