https://pantsbuild.org/ logo
c

clever-crayon-70731

10/14/2022, 1:54 PM
In a Python codebase, if I have a BUILD file with
python_sources(name="foo")
, is it meant to be possible to do
import foo
somewhere else?
1
c

curved-television-6568

10/14/2022, 2:33 PM
No, the target name for the Pantsbuild metadata about your project is not reflected in the project sources.
c

clever-crayon-70731

10/14/2022, 2:41 PM
Alright, just wanted to be sure, thank you!
h

happy-kitchen-89482

10/14/2022, 3:22 PM
Yeah that name usually isn’t important. You’d typically only use it when you add an explicit
dependencies=[...]
to point to the dependency, and even then you often can just point to the source file, without the target name.
3 Views