-
Notifications
You must be signed in to change notification settings - Fork 543
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
pip_parse()
does not correctly read *.pth
files?
#2071
Comments
imports
and deps
via package_annotation
imports
and deps
via package_annotation
?
|
in this case, it's missing perhaps it's because there's a $ cd $(bazel info output_base)
$ cat external/pip_deps_rerun_sdk/site-packages/rerun_sdk.pth
rerun_sdk from docs https://docs.python.org/3/library/site.html |
(if this seems like a valid thing, I can |
Thanks for the repro and the logs, this makes it easier to understand. The I think ideally the solution would be to investigate how to make |
imports
and deps
via package_annotation
?pip_parse()
does not correctly read *.pth
files?
sweet, welcome I think simplest way is to assume it's non-executable rules_python/python/private/pypi/generate_whl_library_build_bazel.bzl Lines 85 to 87 in ecad092
would probably need something like |
very loose code: main...EricCousineau-TRI:rules_python:issue-2071 |
This looks like it could work, having such code in whl_library could be a good idea.
If you would like to finish this and submit a PR, feel free to do it. I think the main idea of just reading the pth file in starlark and then appending the imports would be a nice way to do it.
…On 20 July 2024 03:01:02 GMT+09:00, Eric Cousineau ***@***.***> wrote:
very loose code: main...EricCousineau-TRI:rules_python:issue-2071
--
Reply to this email directly or view it on GitHub:
#2071 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
|
Closing this issue as a duplicate of #2156 Any PR to workaround |
🚀 feature request
Relevant Rules
package_annotation()
frompip.bzl
Description
From docs, as of time of writing, you can add
BUILD
content, or add / remove files, but doesn't seem like you can changepy_library(deps, imports)
.For example, rerun.io is an awesome-looking package.
But it doesn't work when using using bazel +
rules_python @ 0.34.0
:https://github.com/EricCousineau-TRI/repro/tree/e084a7434286cf426a71350f79755c7cbab6d6eb/bazel/rules_python_rerun
Seems like either the wheel doesn't declare things s.t.
rules_python
adds./site-packages/rerun_sdk
to the Python path (it only adds./site-packages
).Describe the solution you'd like
For now, would be nice to have something like
Describe alternatives you've considered
For now, will try
package_annotation(..., additive_build_content)
, and include that whenever I usepip("rerun-sdk")
.EDIT: This workaround worked: EricCousineau-TRI/repro@96e1336
The text was updated successfully, but these errors were encountered: