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

dazzling-jackal-21474

11/14/2022, 12:17 PM
👋 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

polite-garden-50641

11/14/2022, 2:56 PM
d

dazzling-jackal-21474

11/14/2022, 2:59 PM
Sorry, what i mean is can we have versioning for local package which we write internally
p

polite-garden-50641

11/14/2022, 4:42 PM
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

dazzling-jackal-21474

11/15/2022, 3:42 AM
@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

polite-garden-50641

11/15/2022, 3:40 PM
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

dazzling-jackal-21474

11/15/2022, 4:02 PM
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

polite-garden-50641

11/15/2022, 4:04 PM
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

dazzling-jackal-21474

11/15/2022, 4:08 PM
Hi @happy-kitchen-89482, could you please suggest on this
h

happy-kitchen-89482

11/16/2022, 12:49 AM
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
2 Views