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

Function toPythonBuild

packages/python/src/version.ts:123–138  ·  view source on GitHub ↗
(opt: PythonVersion)

Source from the content-addressed store, hash-verified

121}
122
123function toPythonBuild(opt: PythonVersion): PythonBuild {
124 if (opt.major === undefined || opt.minor === undefined) {
125 throw new Error(
126 'toPythonBuild called with PythonVersion missing `major`/`minor`; this is a bug.'
127 );
128 }
129 const platform = detectPlatform();
130 return {
131 version: { major: opt.major, minor: opt.minor },
132 implementation: 'cpython',
133 variant: 'default',
134 os: platform.os,
135 architecture: platform.archName,
136 libc: platform.libc,
137 };
138}
139
140/**
141 * Build the list of available Python builds for selectPythonVersion().

Callers 1

resolvePythonVersionFunction · 0.85

Calls 1

detectPlatformFunction · 0.90

Tested by

no test coverage detected