def select_interpreter_for_targets(self, targets):
Pick an interpreter compatible with all the specified targets.
allowed_interpreters = OrderedSet(self.interpreters)
tgts_with_compatibilities = [] // Used only for error messages.
// Constrain allowed_interpreters based on each target"s compatibility requirements.
for target in targets:
After Change
def select_interpreter_for_targets(self, targets):
Pick an interpreter compatible with all the specified targets.
tgts_with_compatibilities = []
filters = set()
for target in targets:
if isinstance(target, PythonTarget) and target.compatibility:
tgts_with_compatibilities.append(target)
filters.update(target.compatibility)
allowed_interpreters = set(self.setup(filters=filters))
// Constrain allowed_interpreters based on each target"s compatibility requirements.
for target in tgts_with_compatibilities:
compatible_with_target = set(self._matching(allowed_interpreters, target.compatibility))