@@ -211,13 +211,14 @@ function dumpAllFilesInTempDir(tempDirName: string) {
211
211
async function updateSetuptools (
212
212
setuptoolsVersion : string ,
213
213
dir : string ,
214
- pythonEnv
214
+ pythonEnv ,
215
+ command : string
215
216
) {
216
217
// For python 3.12, setuptools needs to be updated
217
218
// due to removal of some deprecated packages
218
219
// see: https://github.com/pypa/pip/pull/11997
219
220
220
- const pythonVersion = await subProcess . execute ( `python` , [ '--version' ] , {
221
+ const pythonVersion = await subProcess . execute ( command , [ '--version' ] , {
221
222
cwd : dir ,
222
223
env : pythonEnv ,
223
224
} ) ;
@@ -226,10 +227,14 @@ async function updateSetuptools(
226
227
return ;
227
228
}
228
229
229
- await subProcess . execute ( `pip install setuptools==${ setuptoolsVersion } ` , [ ] , {
230
- cwd : dir ,
231
- env : pythonEnv ,
232
- } ) ;
230
+ await subProcess . execute (
231
+ `${ command } -m pip install setuptools==${ setuptoolsVersion } ` ,
232
+ [ ] ,
233
+ {
234
+ cwd : dir ,
235
+ env : pythonEnv ,
236
+ }
237
+ ) ;
233
238
}
234
239
235
240
export async function inspectInstalledDeps (
@@ -251,7 +256,12 @@ export async function inspectInstalledDeps(
251
256
try {
252
257
const pythonEnv = getPythonEnv ( targetFile ) ;
253
258
254
- await updateSetuptools ( UPDATED_SETUPTOOLS_VERSION , root , pythonEnv ) ;
259
+ await updateSetuptools (
260
+ UPDATED_SETUPTOOLS_VERSION ,
261
+ root ,
262
+ pythonEnv ,
263
+ command
264
+ ) ;
255
265
256
266
// See ../../pysrc/README.md
257
267
const output = await subProcess . execute (
0 commit comments