melodic-lighter-17242
02/01/2024, 12:14 PMname/src/a/b/c/file.py:../../../sources, where the BUILD file is under name/src and includes this content:
python_sources(
name="sources",
sources=["**/*.py"],
)
python_requirement(
name="requirements",
requirements=[
"click==8.1.7",
],
)
python_distribution(
name="dist",
dependencies=[":sources"],
provides=python_artifact(
name="name",
version="1.0.0"
),
)
a. The target <like-above> imports click, but Pants cannot safely infer a dependency because more than one target owns this module, so it is ambiguous which to use: [‘cli/src:requirements’, ‘library/src:requirements’]. I could use multiple resolves here, but that doesn’t make sense. Both the library and the CLI consume the package on their own (as opposed to two different CLIs, where multiple resolves do make sense).
WDYT?curved-television-6568
02/01/2024, 12:17 PMpython_requirement targets, both offering click?melodic-lighter-17242
02/01/2024, 12:18 PMcurved-television-6568
02/01/2024, 12:29 PMmelodic-lighter-17242
02/01/2024, 12:31 PMgorgeous-winter-99296
02/01/2024, 12:37 PMgorgeous-winter-99296
02/01/2024, 12:39 PMmelodic-lighter-17242
02/01/2024, 1:04 PMcurved-television-6568
02/01/2024, 1:07 PMgorgeous-winter-99296
02/01/2024, 1:10 PMname/src, move it to namegorgeous-winter-99296
02/01/2024, 1:13 PM