I am a bit puzzled at pants' documentation for <in...
# general
l
I am a bit puzzled at pants' documentation for interpreter compatibility in python. I mean: the doc doesn't say explicitly what the constraints are used for. I suppose it is for
pants
to check that the running interpreter is included in the constraint specified by
interpreter_constraints
, correct? What happens when 1/ the top-level constraint is overridden by more specific constraint in a subset of the repo and 2/ the running interpreter is the most general one (i.e. it doesn't honor the more specific constraint)? Does
pants
automatically skips the targets whose constraint is not satisfied by the interpreter? Or does
pants
build the interpreter on its own when seeing the constraints? I can't remember how
pants
bootstrapped the first times I used it 😅
e
"the running interpreter" should be ignored conceptually. It's true Pants uses Python itself, and has its own Python constraints (can currently only work on CPython 3.7, 3.8 or 3.9), but when running your Python code (linting it, testing it, what have you), Pants finds an interpreter matching your code's constraints. It does not build an interpreter currently, it only knows how to find them (~on your
PATH
by default).
l
@enough-analyst-54434> I see, thanks for clarifying that 👍