wide-midnight-78598
11/12/2022, 6:02 AMdep which is a pex_binary - that should necessarily already have interpreter_constraints resolved, correct? If so, is there any way to just "get" those resolved constraints?
Right now, I'm doing this, which seems silly for a target that has already resolved its constraints.
interpreter_constraints = InterpreterConstraints.create_from_targets(
direct_deps, python_setup
) or InterpreterConstraints(python_setup.interpreter_constraints)
I thought a FieldSetsPerTargetRequest with a PexBinaryFieldSet had potential, but that's an empty collection. And dep_target.get(InterpreterConstraintsField)) returns Nonewide-midnight-78598
11/12/2022, 6:03 AMwitty-crayon-22786
11/12/2022, 6:10 AMwitty-crayon-22786
11/12/2022, 6:10 AMwitty-crayon-22786
11/12/2022, 6:11 AMyou only need the `pex_binary`’s constraints: none of its deps.with defaulting to the global default as you did there
wide-midnight-78598
11/12/2022, 6:11 AMpex_binary as a dep to my target - so grabbing those constraints is what I'd like to dowitty-crayon-22786
11/12/2022, 6:11 AMwide-midnight-78598
11/12/2022, 6:12 AMpex_binary didn't have any explicit interpreter_constraints specified?witty-crayon-22786
11/12/2022, 6:15 AMpex_binary does have an interpreter_constraints fieldwitty-crayon-22786
11/12/2022, 6:15 AMinterpreter_constraints = InterpreterConstraints.create_from_targets(
pex_binary, python_setup
) or InterpreterConstraints(python_setup.interpreter_constraints)witty-crayon-22786
11/12/2022, 6:16 AMwide-midnight-78598
11/12/2022, 6:17 AMwitty-crayon-22786
11/12/2022, 6:17 AMwitty-crayon-22786
11/12/2022, 6:17 AMwide-midnight-78598
11/12/2022, 6:18 AM