-
-
Notifications
You must be signed in to change notification settings - Fork 639
refactor(pypi): extract the wheel without python #3430
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
refactor(pypi): extract the wheel without python #3430
Conversation
aca42c3 to
d8b1274
Compare
|
Nice. A bonus of this is it'll make it easier to use an alternative extractor (it can just extract instead of having to deal with wheel format details) |
|
I would trigger merge, but this is set as draft -- overall it LGTM. Is there some edge case the python code handles that a plain extract doesn't? |
|
I renamed the title; this is purely internal and I don't see why it would be user-notable |
This is a small utility function to get us Python free when wheels are extracted in the repository phase. Next is to extract the wheel using `repository_ctx.extract` (#3430). Whereas patching the wheel after extracting is more involved to be done without Python because we need to rezip the wheel and that has to be done with Python for a few reasons (to stay sane). If we want to remove this, then we would have to create a `whl` file in the build phase, which could work, but will need to be an exercise for the reader. Nevertheless, this moves us towards removing any side-effects from Python interpreter, so changing the default interpreter would not cause us to refetch everything. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
With this we start extracting the wheel without Python and it becomes a requirement only when patching (we will extract the wheel without Python, patch it and then re-compress it which makes a very inefficient process). This should result in much faster executions.
d8b1274 to
034653b
Compare
|
OK, I updated the Let me know what kind of extra tests we should have here. |
With this we start extracting the wheel without Python and it becomes a requirement only when patching (we will extract the wheel without Python, patch it and then re-compress it which makes a very inefficient process). This should result in much faster executions because we can start extracting wheels even before we fetch the entire Python toolchain and we don't need to fetch it in a wheel-only setup until we are actually building/executing tests. What is more bazel is faster in extracting everything. Work towards #2948
Removed 'python_interpreter_target' from the configuration.
With this we start extracting the wheel without Python and
it becomes a requirement only when patching (we will extract
the wheel without Python, patch it and then re-compress it
which makes a very inefficient process).
This should result in much faster executions because we can start
extracting wheels even before we fetch the entire Python toolchain
and we don't need to fetch it in a wheel-only setup until we are
actually building/executing tests. What is more bazel is faster
in extracting everything.
Work towards #2948