@@ -231,27 +231,29 @@ def python_cache(self) -> dict[str, Any]:
231
231
@property
232
232
def base_python (self ) -> PythonInfo :
233
233
"""Resolve base python"""
234
+ base_pythons : list [str ] = self .conf ["base_python" ]
235
+
234
236
if self ._base_python_searched is False :
235
- base_pythons : list [str ] = self .conf ["base_python" ]
236
237
self ._base_python_searched = True
237
238
self ._base_python = self ._get_python (base_pythons )
238
- if self ._base_python is None :
239
- if self .core ["skip_missing_interpreters" ]:
240
- raise Skip (f"could not find python interpreter with spec(s): { ', ' .join (base_pythons )} " )
241
- raise NoInterpreter (base_pythons )
242
- if self .journal :
239
+ if self ._base_python is not None and self .journal :
243
240
value = self ._get_env_journal_python ()
244
241
self .journal ["python" ] = value
242
+
243
+ if self ._base_python is None :
244
+ if self .core ["skip_missing_interpreters" ]:
245
+ raise Skip (f"could not find python interpreter with spec(s): { ', ' .join (base_pythons )} " )
246
+ raise NoInterpreter (base_pythons )
247
+
245
248
return cast (PythonInfo , self ._base_python )
246
249
247
250
def _get_env_journal_python (self ) -> dict [str , Any ]:
248
- assert self ._base_python is not None
249
251
return {
250
- "implementation" : self ._base_python .implementation ,
252
+ "implementation" : self .base_python .implementation ,
251
253
"version_info" : tuple (self .base_python .version_info ),
252
- "version" : self ._base_python .version ,
253
- "is_64" : self ._base_python .is_64 ,
254
- "sysplatform" : self ._base_python .platform ,
254
+ "version" : self .base_python .version ,
255
+ "is_64" : self .base_python .is_64 ,
256
+ "sysplatform" : self .base_python .platform ,
255
257
"extra_version_info" : None ,
256
258
}
257
259
0 commit comments