@@ -60,25 +60,6 @@ import { spawnNode } from '../spawn/spawn-node.mjs'
6060
6161import type { CResult } from '../../types.mjs'
6262
63- /**
64- * SHA-256 checksums for Python 3.10.18+20250918 install_only builds.
65- * Retrieved from: https://github.com/astral-sh/python-build-standalone/releases/tag/20250918
66- */
67- const PYTHON_CHECKSUMS : Record < string , string > = {
68- // @ts -expect-error - __proto__: null creates object without prototype.
69- __proto__ : null ,
70- 'aarch64-apple-darwin' :
71- '5f2a620c5278967c7fe666c9d41dc5d653c1829b3c26f62ece0d818e1a5ff9f8' ,
72- 'aarch64-unknown-linux-gnu' :
73- '16cb27d4d4d03cfb68d55d64e83a96aa3cd93c002c1de8ab7ddf3aa867c9e5f0' ,
74- 'x86_64-apple-darwin' :
75- '4ee44bf41d06626ad2745375d690679587c12d375e41a78f857a9660ce88e255' ,
76- 'x86_64-pc-windows-msvc' :
77- '7f8b19397a39188d07c68d83fd88b8da35ef1e007bdb066ed86169d60539f644' ,
78- 'x86_64-unknown-linux-gnu' :
79- 'a6b9950cee5467d3a0a35473b3e848377912616668968627ba2254e5da4a1d1e' ,
80- }
81-
8263/**
8364 * Get the download URL for python-build-standalone based on platform and architecture.
8465 *
@@ -205,39 +186,6 @@ export async function checkSystemPython(): Promise<string | null> {
205186 }
206187}
207188
208- /**
209- * Get the checksum for the current platform's Python build.
210- * Returns the SHA-256 checksum from PYTHON_CHECKSUMS map.
211- */
212- function getPythonChecksum ( ) : string {
213- const platform = os . platform ( )
214- const arch = os . arch ( )
215-
216- let platformTriple : string
217-
218- if ( platform === 'darwin' ) {
219- platformTriple =
220- arch === 'arm64' ? 'aarch64-apple-darwin' : 'x86_64-apple-darwin'
221- } else if ( platform === 'linux' ) {
222- platformTriple =
223- arch === 'arm64'
224- ? 'aarch64-unknown-linux-gnu'
225- : 'x86_64-unknown-linux-gnu'
226- } else if ( platform === 'win32' ) {
227- platformTriple = 'x86_64-pc-windows-msvc'
228- } else {
229- throw new InputError ( `Unsupported platform: ${ platform } ` )
230- }
231-
232- const checksum = PYTHON_CHECKSUMS [ platformTriple ]
233- if ( ! checksum ) {
234- throw new InputError (
235- `No checksum available for platform: ${ platformTriple } ` ,
236- )
237- }
238-
239- return checksum
240- }
241189
242190/**
243191 * Download and extract Python from python-build-standalone using downloadBinary.
@@ -246,17 +194,15 @@ function getPythonChecksum(): string {
246194async function downloadPython ( pythonDir : string ) : Promise < void > {
247195 const url = getPythonStandaloneUrl ( )
248196 const tarballName = 'python-standalone.tar.gz'
249- const checksum = getPythonChecksum ( )
250197
251198 // Ensure directory exists.
252199 await safeMkdir ( pythonDir , { recursive : true } )
253200
254201 try {
255- // Use downloadBinary to download the tarball with caching and checksum verification .
202+ // Use downloadBinary to download the tarball with caching.
256203 const result = await downloadBinary ( {
257204 url,
258205 name : tarballName ,
259- checksum,
260206 } )
261207
262208 // Extract the tarball to pythonDir.
0 commit comments