is it possible to use multiple python versions wit...
# general
f
is it possible to use multiple python versions with pants? E.g., mark some libraries/binaries as using 2.7, others as using 3.6, in the same repo?
g
I haven’t used this myself, but take a look at the python_binary compatibility option: https://www.pantsbuild.org/build_dictionary.html I believe if you want to build binaries for python 2 & 3 you could have two python_binary targets, each with the same options, but with each target customizing the “compatibility” arg.
s
Yes, you can. Travis is correct. Pants will plumb the interpreter constraints defined in the target's compatibility field through to the produced pex, and the pex will search PEXRC or $PATH at runtime for an interpreter that satisfies the constraints.