Skip to content
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

[bazel, rules_python] Unable to get correct Python path from whl? #6930

Closed
EricCousineau-TRI opened this issue Jul 17, 2024 · 3 comments
Closed
Labels
🪳 bug Something isn't working 👀 needs triage This issue needs to be triaged by the Rerun team

Comments

@EricCousineau-TRI
Copy link

EricCousineau-TRI commented Jul 17, 2024

Describe the bug
Relates bazelbuild/rules_python#2071

To Reproduce
See repro in linked issue, i.e,.
https://github.com/EricCousineau-TRI/repro/tree/e084a7434286cf426a71350f79755c7cbab6d6eb/bazel/rules_python_rerun

Workaround: EricCousineau-TRI/repro@96e1336

Expected behavior
Things are declared such that rules_python generates rules that have correct PYTHONPATH

Screenshots
N/A

Backtrace
N/A

Desktop (please complete the following information):

  • OS: Ubuntu 22.04

Rerun version
0.17.0

Additional context
using bazel build system + rules_python

@EricCousineau-TRI EricCousineau-TRI added 👀 needs triage This issue needs to be triaged by the Rerun team 🪳 bug Something isn't working labels Jul 17, 2024
@Wumpf
Copy link
Member

Wumpf commented Jul 18, 2024

I unfortunately don't know anything about Bazel build setups, but I suppose there's some issue about the package being called rerun-sdk, but the module is rerun?

@abey79
Copy link
Member

abey79 commented Jul 18, 2024

I know nothing about bezel, but I'm kind of surprised by that __init__.py file there. I dont have it when I manually install rerun in a venv:

$ ls external/pip_deps_rerun_sdk/site-packages/rerun_sdk
__init__.py  rerun  rerun_cli

Also, for records, this what I have in my site-packages:

…/lib/python3.11/site-packages 
❯ ls | grep rerun
rerun_bindings
rerun_sdk
rerun_sdk-0.17.0.dist-info
rerun_sdk.pth

You may want to check if you have that .pth in particular.

@EricCousineau-TRI
Copy link
Author

but I suppose there's some issue about the package being called rerun-sdk, but the module is rerun

yeah, I think that it's because the module is under rerun_sdk/{rerun,rerun_cli} as abey79 mentioned.

You may want to check if you have that .pth in particular.

yeah, it seems like rules_python may not correctly recognize .pth files:
bazelbuild/rules_python#2071 (comment)

closing this issue, as it seems like a bazel rules_python issue.
thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 👀 needs triage This issue needs to be triaged by the Rerun team
Projects
None yet
Development

No branches or pull requests

3 participants