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

Function getAvailablePythonBuilds

packages/python/src/version.ts:148–160  ·  view source on GitHub ↗

* Build the list of available Python builds for selectPythonVersion(). * * Ordered with DEFAULT_PYTHON_VERSION first, then remaining versions in * descending order. Only includes installed, non-discontinued versions. * This preserves the "3.12 preferred" behavior since selectPythonVersion * ret

()

Source from the content-addressed store, hash-verified

146 * returns the first match.
147 */
148function getAvailablePythonBuilds(): PythonBuild[] {
149 const installed = allOptions.filter(
150 opt => !isDiscontinued(opt) && isInstalled(opt)
151 );
152 const defaultOpt = installed.find(opt =>
153 versionsEqual(opt, DEFAULT_PYTHON_VERSION)
154 );
155 const rest = installed.filter(
156 opt => !versionsEqual(opt, DEFAULT_PYTHON_VERSION)
157 );
158 const ordered = defaultOpt ? [defaultOpt, ...rest] : rest;
159 return ordered.map(toPythonBuild);
160}
161
162/**
163 * Build the list of ALL known Python builds (including discontinued

Callers 1

resolvePythonVersionFunction · 0.85

Calls 5

isDiscontinuedFunction · 0.85
versionsEqualFunction · 0.85
filterMethod · 0.80
isInstalledFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected