:wave: Hi everyone! We are implementing pants in o...
# general
d
👋 Hi everyone! We are implementing pants in our new project, one doubt I had during this how we can manage versions of package inside pants. I need to maintain multiple version for a shared package. Different versions will be used by different service. Is it possible to have multiple versions based on git tag for a local package.
p
d
Sorry, what i mean is can we have versioning for local package which we write internally
p
do u have two different versions of the same package in your source tree ? or is this shared package coming from a private index (i.e. a private pypi server) ?
d
@polite-garden-50641 Yes i have different versions of same package in source tree
Actually i need to manage multiple versions of samr package, what is the best way for that in pants
p
then what you have effectively is different libraries. now, if they all expose the same modules than pants would not be able to properly infer them, you will have to do that manually by adding
dependencies
to your
python_sources
target and perhaps using the
# pants: no-infer-dep
directive. https://www.pantsbuild.org/docs/reference-python-infer
d
Currently I am following this way , is there any other way we can mention version in dependencies and python_source and build old versions based on git on the go
p
I don't think so. but I might have limited information here. maybe post that question back to #general or to the GH discussion board.
d
Hi @happy-kitchen-89482, could you please suggest on this
h
I’m a little confused about this - you have multiple copies of the same code in the repo? Can you describe what you have today (pre-pants) in terms of code structure and the workflows around it?
Hi @dazzling-jackal-21474, just following up on this - can you clarify what you’re doing today, that will help figure out how to support it with Pants