File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 43
43
get_variants_json_filename ,
44
44
)
45
45
46
+ from variantlib .variants_json import VariantsJson
47
+
46
48
if TYPE_CHECKING :
47
49
from pip ._vendor .typing_extensions import TypeGuard
48
50
@@ -596,6 +598,21 @@ def compute_best_candidate(
596
598
applicable_candidates = self .get_applicable_candidates (candidates )
597
599
598
600
best_candidate = self .sort_best_candidate (applicable_candidates )
601
+ if best_candidate .variant_hash is not None :
602
+ variants_json = VariantsJson (
603
+ self ._variants_json .get (
604
+ f"{ best_candidate .name } -{ best_candidate .version } -variants.json"
605
+ ).json ()
606
+ )
607
+ vdesc = variants_json .variants [best_candidate .variant_hash ]
608
+ logger .info ("%(name)s %(version)s; selected variant: %(variant_hash)s" ,
609
+ {
610
+ "name" : best_candidate .name ,
611
+ "version" : best_candidate .version ,
612
+ "variant_hash" : best_candidate .variant_hash ,
613
+ })
614
+ for vprop in vdesc .properties :
615
+ logger .info (" %(vprop)s" , {"vprop" : vprop .to_str ()})
599
616
600
617
return BestCandidateResult (
601
618
candidates ,
You can’t perform that action at this time.
0 commit comments