(opt: PythonVersion)
| 121 | } |
| 122 | |
| 123 | function 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(). |
no test coverage detected