refined-addition-53644
01/07/2022, 10:44 AMwitty-family-13337
01/07/2022, 2:47 PM[python-infer].imports = false
hundreds-father-404
01/07/2022, 4:30 PMit’s just that their definitions are global so they are visible in a single common place but that doesn’t mean all the individual compilation units use them allIndeed. Double checking that you read the conceptual model at https://www.pantsbuild.org/docs/python-third-party-dependencies?
The issue I am facing right now with a monorepo is that I have to actively maintain 3rdparty dependencies for all individual python packages inside my monorepo.Is there a particular issue you're running into?
refined-addition-53644
01/07/2022, 5:05 PMpyproject.toml
, which was generated by poetry.
I tried to build
pants package package1/packag2
, which have common dependency pandas
, but pants
was failing since it saw two pandas
targets. This was done using poetry_requirements
in the BUILD file.
After this issue I created a top level 3rdparty
folder with just a single requirements.txt
like you have in pants
github repository. This global ``requirements.txt`works fine but now I have to ensure whatever dependencies I add in one of the packages say using poetry add <dependencies>
should also be added to requirements.txt
refined-addition-53644
01/07/2022, 5:12 PMeager-dress-66405
01/07/2022, 9:46 PMpython_requirement(s)
as "default" so that any target will infer dependence on them, but individual targets be able to specify overrides. This way one "binary" can depend on a different version w/o all the other build files in the repo needing to be updated to list it explcitily.