-
Notifications
You must be signed in to change notification settings - Fork 541
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
Automatically insert __init__.py files when building wheels. #394
Comments
The auto addition of init files is intended to be disabled and removed at some point, as it has ended up causing more issues than expected: bazelbuild/bazel#7386 I would suggest either manually making the init files where necessary (as you would in any other python packaging outside Bazel) or should this be added to rules_python that the default be having it disabled. |
I agree that automatic creation of __init__ is causing many problems. Doing
it for wheels would also prevent building namespace wheels.
The simplest workaround is to just create __init__.py files in your
repository.
…--
Paweł Stradomski
wt., 22 gru 2020, 16:55 użytkownik Adam Liddell <[email protected]>
napisał:
The auto addition of init files is intended to be disabled and removed at
some point, as it has ended up causing more issues than expected:
bazelbuild/bazel#7386 <bazelbuild/bazel#7386>
I would suggest either manually making the init files where necessary (as
you would in any other python packaging outside Bazel) or should this be
added to rules_python that the default be having it disabled.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#394 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKU4J4IVRVITNHAU7MJ4Y3LSWC6OPANCNFSM4VE5E3MA>
.
|
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. |
@awbraunstein this has just recently been marked for closure. Do you perceive a need to keep this open, or are you satisfied that manual |
No, you can keep this closed. I ended up implementing a manual solution. |
🚀 feature request
Relevant Rules
py_wheel
Description
Bazel doesn't require any
__init__.py
files and adds those automatically. When building apy_wheel
, it would be useful if__init__.py
files could be automatically inserted to allow the wheel to be used without significant modification to the bazel repository.Describe the solution you'd like
I implemented this by doing this in the
wheelmaker.py
file by tracking what files are added and what directories need__init__.py
files added that weren't provided. Then at the very end before writing the record, I add all the empty__init__.py
files to the zip and record.Describe alternatives you've considered
My solution above was my workaround.
The text was updated successfully, but these errors were encountered: