I'm getting an error when I have two parallel `pyt...
# general
v
I'm getting an error when I have two parallel
python_sources
targets but no target named for the folder itself
Copy code
ResolveError: The address projects/hello_world:hello_world from the `dependencies` field of the target projects/hello_world/build.py:build does not exist.
The
BUILD
file looks like this:
Copy code
python_sources(
    name="src-python"
    sources=[*python_sources.sources.default, "!build.py"],
)

python_sources(
    name="build",
    sources=["build.py"],
    overrides={
        "build.py": {"dependencies": ["!./__init__.py"]},
    },
)
If I remove the
name
from the first python_sources, that resolves the error, but
pants peek
on both the :build target and build.py do not show any dependency on the folder itself. What am I missing here?
g
Does using a singular
python_source
for the latter rule affect this?
v
I can try - the different address name generated by python_source (singular) means I need to update the target that collects */build.py if I go that route
Same error afterward (but you can see the different address naming without the file name:
Copy code
ResolveError: The address projects/hello_world:hello_world from the `dependencies` field of the target projects/hello_world:build does not exist.