Repository navigation
Allow relative Python executable paths in Windows trampoline - #3717
Conversation
| }); | ||
|
|
||
| path | ||
| if !path.as_bytes().starts_with(b"..") { |
There was a problem hiding this comment.
Is there no has_root or similar that we can use here? There are lots of relative paths that won't necessarily start with this.
There was a problem hiding this comment.
I've never done work without the standard library so I'm not sure what is possible.
charliermarsh
left a comment
There was a problem hiding this comment.
Can you share the bigger picture on how you plan to use or integrate this?
|
Sure, basically the script I put in the description I will use to finalize an entire Python installation until the mentioned feature request is implemented and I can install packages with that flag instead of running that script as a postprocessing step. |
|
Here is an example showing that it works: |
|
Thanks. I want to play around with the code a bit before merging to see if it can be generalized at all. |
|
I will try to get to it tonight though. |
|
I tried to invert the condition to make it a bit more general (e.g., shouldn't |
|
Just tried locally, it still works! |
|
|
I think I have to rebuild them as part of the PR. |
|
How do you rebuild them, locally? |
|
I followed the cross compilation instructions in the |
|
I'm having trouble verifying them locally though. (I can't get them to fail.) |
|
Fail how? |
|
I just want to make sure they're actually being used. So I tried (e.g.) overwriting the x86 trampolies with the ARM trampolines but my commands are still working which seems wrong. |
|
Are you testing it with this package? https://github.com/astral-sh/uv/blob/0.1.45/crates/install-wheel-rs/src/wheel.rs#L26-L40 |
|
Yeah, although I think I'm getting it to fail as expected now. |
|
For future reference: changing just the trampolines doesn't trigger a rebuild (with |
|
Thank you very much! |
|
Thanks Ofek! |
|
Improved the README a bit: #3731 |
Summary
This is a prerequisite for #3669
Test Plan
Download one of the standalone distributions on Windows then use its Python to run the following script and then run the scripts it creates (only pip):