-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update documentation for utilizing py_library from nested folder #54
Comments
Ok, I figured it out, it seems that because the name of my py_binary is If I simple do Is there some rationale as to why py_binary/py_library do this? I can escalate this into the actual bazelbuild/bazel repo since this is behavior exhibited by the native rules. |
@ulfjack Who owns the native Python rules? |
lberki does, although we're planning on transitioning them to the python team this year. @duggelz |
This should be fixed once this change is released in Bazel: bazelbuild/bazel@e9c885a You'll need to add Meanwhile, my practical advice is to rename the directory or the file. You'll keep running into similar problems, even in non-Bazel contexts, because of how Python implicitly adds the main script directory to the start of the Python import path. |
Regarding the Python behavior of adding the main script's directory to the import path, this is something we'd like to workaround to eliminate a class of hermeticity problems. See bazelbuild/bazel#7091. |
Hi Everyone,
My current folder structure is as follows:
I am trying to import all the analyzers in my
analysis.py
file, and the two BUILD rules look as follows:It seems like I have tried every way of attempting to import
analyzers
into myanalysis.py
file, including;along with those combinations with my WORKSPACE name.
Am I missing something obvious? thanks!
The text was updated successfully, but these errors were encountered: