-
-
Notifications
You must be signed in to change notification settings - Fork 674
Description
Is your feature request related to a problem? Please describe.
Most Python targets have separate interpreter_constraints and resolve fields. Resolves themselves also have interpreter constraints set in pants.toml. By default, the interpreter_constraints on Python targets defaults to the [python].interpreter_constraints field in pants.toml. However, if you have multiple resolves with different interpreter constraints, you now have to set the interpreter constraints on each Python source file to be a subset of the constraints of its resolve.
Describe the solution you'd like
There should be an option in the Python subsystem to allow Python targets with a resolves field to fall back to the interpreter constraints of their resolve instead of the global constraints.
Describe alternatives you've considered
I use a macro to make the resolve constraints and source file constraints match today, but this means constraints must be updated and match in multiple spots instead of just having pants.toml as the single source of truth.