-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Python Zip Generated With --build_python_zip Do Not Have All of the Runfiles #14100
Comments
@aiuto what do you think about this issue? |
I don't have an opinion. I was just doing incoming triage. This is a question for the python rules folks. |
okay I see. Shall we ping any of them? |
cc @meteorcloudy since you implemented the flag in the first place. we have the following rule. which we are using as a dependency to rules_python. it works except when we pass
|
@meteorcloudy I am able to reproduce the issue with the following minimal example:
Looks like the folder is added but not with its content. |
@AlessandroPatti That is work as intended. The genrule only declares "lib" as an output, which is a directory, Bazel won't recursively collect files under it. Therefore, normally |
@meteorcloudy would it make sense to have a flag like |
Description of the problem / feature request:
Question is about python builds specifically about
--build_python_zip
flag. We have a custom rule that emits PyInfo provider so we are able to depend on our custom rule from py_library and py_binary rules. Our custom rule basically unzips a wheel package and adds it to theimports
field of PyInfo so that it is added to the python path when executing the binary. This works well withbazel run //path_to_py_binary
but when we use--build_python_zip
flag we see that our custom rules were not executed and the contents of the wheel packages were not unzipped.--build_python_zip
flag changing the behaviour of py_binary which seems like an issue to me.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create a custom rule that unzips a wheel and adds it to the PyInfo(imports) and then zip generated with
--build_python_zip
does not include those unzipped wheel packages whereas running py_binary withbazel run
does includeWhat operating system are you running Bazel on?
mac os x
What's the output of
bazel info release
?release 4.2.1
If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?Have you found anything relevant by searching the web?
I've seen some other issues with build_python_zip flag but was not very similar to this one.
Any other information, logs, or outputs that you want to share?
The text was updated successfully, but these errors were encountered: