https://pantsbuild.org/ logo
b

boundless-zebra-79556

08/22/2022, 11:49 PM
Newbie question: when running
pants_from_source
to test changes, is interpreter constraint
==3.9.*
somehow added? I've been building with
==3.10.*
and its been working fine on 2.13 rc, but running from source is failing because of conflicting constraints
e

enough-analyst-54434

08/22/2022, 11:57 PM
Pants must itself run on >=3.7,<3.10 so that's coming in conflict there.
b

boundless-zebra-79556

08/22/2022, 11:57 PM
so I have both 3.9 and 3.10 on PATH, and when running pants prod version, it worked out ok
e

enough-analyst-54434

08/22/2022, 11:59 PM
The difference here is you're using Pants from sources. We don't have that setup to handle multiple resolves, which I think is what you'd need here.
Someone else may be able to provide guidance from experience working around this. I'm not sure how you'd do it off the top of my head.
b

boundless-zebra-79556

08/23/2022, 12:00 AM
I see. Thanks. Not a blocker for now, I can adjust to 3.9 and test my changes
e

enough-analyst-54434

08/23/2022, 12:01 AM
If you can do that, definitely best for now.
h

hundreds-father-404

08/23/2022, 12:01 AM
wait is this for a pants plugin? generally the version of Python used to run Pants != the version used for your own code, except for Pants plugins
e

enough-analyst-54434

08/23/2022, 12:02 AM
A plugin may or may not be involved. This is using pants from sources.
Does that just work with conflicting ICs in the top level pants.toml?
h

hundreds-father-404

08/23/2022, 12:07 AM
It should. It simply runs our
./pants
bash script from
pantsbuild/pants
, which can be a different Python version than
[python].interpreter_constraints
https://github.com/pantsbuild/example-python/blob/main/pants_from_sources#L23