busy-piano-29318
05/06/2024, 1:52 PMpants repl :: and that worked nicely), and would like to build different artifacts (wheels) based on a subset of the shared code.
Currently (with poetry, hatch, pdm or rye), I have the definitions in a pyproject.toml file for each thing to build. I guess it is different when using 👖 . How do I specify that the artifact 1 need these namespace packages, and artifact 2 those other ones? I have no code where the configs are, all code is in the shared top folder. Is that possible to do with Pants?busy-piano-29318
05/06/2024, 1:53 PMbusy-piano-29318
05/06/2024, 1:59 PMdry-architect-80370
05/06/2024, 2:03 PMpants run path/to/your/entrypoint.py . For the dependencies, Pants reads your import statements and resolves everything by itself.busy-piano-29318
05/06/2024, 2:05 PMdry-architect-80370
05/06/2024, 2:08 PMpython_distribution in one of yours BUILD files.
https://www.pantsbuild.org/2.20/docs/python/goals/package#create-a-setuptools-distributionhappy-kitchen-89482
05/06/2024, 4:11 PMhappy-kitchen-89482
05/06/2024, 4:12 PMpython_distribution is how you tell Pants about a wheel you want it to buildhappy-kitchen-89482
05/06/2024, 4:13 PMhappy-kitchen-89482
05/06/2024, 4:14 PMhappy-kitchen-89482
05/06/2024, 4:15 PMpython_distribution targets in a single BUILD file, or scatter them throughout the codebase, whatever makes sense for your repo layoutbusy-piano-29318
05/06/2024, 4:17 PMhappy-kitchen-89482
05/06/2024, 4:20 PMbusy-piano-29318
05/06/2024, 4:22 PMhappy-kitchen-89482
05/06/2024, 4:25 PMhappy-kitchen-89482
05/06/2024, 4:26 PMhappy-kitchen-89482
05/06/2024, 4:26 PMbusy-piano-29318
05/06/2024, 4:26 PM