-
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
--bootstrap_impl=script breaks py_binary with py_package + py_wheel #2489
Comments
I think this is somewhat WAI. A plain py_binary can't really be given as something for py_package to process, and the plain py_binary isn't meant to be redistributable. The first order problem is that zip doesn't support symlinks. There's some extensions to allow it to store them, though. However, that might be tricky because most of files it is given are going to be symlinks to something else, so we'd need some way to tell "dereference these symlinks, but not these symlinks". Maybe by reading the symlink and see if its non-absolute? IDK. If you really want to package the whole binary, then you're probably better off packaging the zip file version of the binary. That has special code in its startup to handle the case of coming from a zip file that couldn't store symlinks. Why do you want to pass a py_binary to py_package? |
Is this also affecting the |
Yeah it's the same problem. The problem as I see it, is that the venv is created both in the runfiles directory, but also in the directory containing the runfiles directory (is there a name for this?). Only the former is required, the latter isn't functional (broken symlink) and never gets invoked anyway; stage-1 bootstrap runs the former. I didn't see an easy way to fix this - usually I would've tried to use runfiles symlinks if I wanted to create a symlink only inside the runfiles directory, but this doesn't let you create arbitrary relative symlinks. Personally I see this as a deficiency of the related |
I don't know, It is affecting pkg_tar . Should be related to bazelbuild/rules_pkg#115 |
This is a very old usecase for us where we build wheels for Apache-beam application for Dataflow jobs |
I personally think the Do I understand correctly that the As for That said, I think the current |
@aignas just tested with
|
I think |
🐞 bug report
Affected Rule
py_package + py_wheel
Is this a regression?
Yes, related commit #2409
Description
Using the resulting py_binary with py_package+py_wheel fails to find the interpreter symlink. This also breaks
pkg_tar
from rules_pkg🔬 Minimal Reproduction
🔥 Exception or Error
The text was updated successfully, but these errors were encountered: