@@ -559,10 +559,6 @@ def __init__(self, name: str, environment: 'Environment',
559559 if not self .clib_compiler .has_header ('Python.h' , '' , environment , extra_args = self .compile_args )[0 ]:
560560 self .is_found = False
561561
562- @staticmethod
563- def log_tried () -> str :
564- return 'sysconfig'
565-
566562def python_factory (env : Environment , kwargs : DependencyObjectKWs ,
567563 installation : T .Optional ['BasicPythonExternalProgram' ] = None ) -> T .List ['DependencyGenerator' ]:
568564 # We can't use the factory_methods decorator here, as we need to pass the
@@ -579,15 +575,16 @@ def python_factory(env: Environment, kwargs: DependencyObjectKWs,
579575 if from_installation :
580576 candidates .append (DependencyCandidate (
581577 functools .partial (PythonPkgConfigDependency , installation = installation ),
582- 'python' , PythonPkgConfigDependency .log_tried () , arguments = (env , kwargs )))
578+ 'python' , PythonPkgConfigDependency .type_name , arguments = (env , kwargs )))
583579 else :
584580 candidates .append (DependencyCandidate .from_dependency (
585581 'python3' , PkgConfigDependency , (env , kwargs )))
586582
587583 if DependencyMethods .SYSTEM in methods :
584+ # This is a unique log-tried.
588585 candidates .append (DependencyCandidate (
589586 functools .partial (PythonSystemDependency , installation = installation ),
590- 'python' , PythonSystemDependency . log_tried () , arguments = (env , kwargs )))
587+ 'python' , 'sysconfig' , arguments = (env , kwargs )))
591588
592589 if DependencyMethods .EXTRAFRAMEWORK in methods :
593590 nkwargs = kwargs .copy ()
@@ -597,7 +594,7 @@ def python_factory(env: Environment, kwargs: DependencyObjectKWs,
597594 nkwargs ['paths' ] = ['/Library/Frameworks' ]
598595 candidates .append (DependencyCandidate (
599596 functools .partial (PythonFrameworkDependency , installation = installation ),
600- 'python' , PythonFrameworkDependency . log_tried () , arguments = (env , nkwargs )))
597+ 'python' , PythonPkgConfigDependency . type_name , arguments = (env , nkwargs )))
601598
602599 return candidates
603600
0 commit comments