quaint-telephone-89068
11/25/2022, 9:51 PM--resolve-local-platforms option allows Pex to substitute a local interpreter for a --platform whenever there is a local interpreter available that fits the abbreviated --platform description. The option also applies to --complete-platform and in either case the test of a match is here:
pex/pex/resolve/target_configuration.py
Lines 139 to 161 in </pantsbuild/pex/commit/b1343ffbc4ef58c456d072c4f700ad23f1f51743|b1343ff>
The test is that there is an intersection between the local interpreter's compatibility tags and those of the foreign platform. Intersection is problematic when the local interpreter supports newer ABIs than the foreign platform. In this case, the local interpreter is used as a substitute for the foreign platform which allows wheels with newer ABIs than the foreign platform can support to be resolved.
To correct this problem, a local interpreter should only be substituted for a foreign platform if its compatibility tags form a subset of the foreign platform tags. In the case of abbreviated --platform there is not much that can be done differently than the current intersection test since the full accurate set of tags is unknown. For the --complete-platform case, however, a subset relationship can be checked instead.
pantsbuild/pexuser
11/25/2022, 9:51 PM