https://pantsbuild.org/ logo
#general
Title
# general
l

lively-gpu-26436

02/16/2023, 5:59 PM
Hi all, I’m trying to get my head around resolves, interpreter constraints and requirements. I have a library that I want to make Py2/Py3 compatible, and I have defined two python_sources, each with the corresponding interpreter_constraints and resolve, but when it comes to the library dependencies, I don’t know how to say that, the py2 sources depend on these versions, and py3 sources on these other ones. I don’t even know if it makes sense at all. Has anyone faced this problem?
e

enough-analyst-54434

02/16/2023, 6:04 PM
This problem is solved at the Python ecosystem level outside Pants: https://peps.python.org/pep-0508/#environment-markers That 1st example is right up your alley, but read the whole thing.
👀 1
l

lively-gpu-26436

02/16/2023, 6:05 PM
Will do @enough-analyst-54434 thanks1
2 Views