Skip to content
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

feat: add cli-32 and cli-64 from conda project #639

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions crates/rattler/resources/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# The Python launchers

To launch Python entrypoints on Windows, we need a corresponding executable (shebangs do not work on Windows).

For this reason, we use the same `cli-32.exe` and `cli-64.exe` files as found in `conda`.
These entry points are signed by Anaconda Inc.

They were taken at the following commit: be5da40dc6f18de7d0690afa1fefff13955ef4ab from the conda git repository ()

The hashes are:

- `cli-32.exe`: `0170dda609519c088b1e4619a1e1d15a01701a6c514bb55f99a85fcbbd541631`
- source in conda/conda: https://github.com/conda/conda/blob/be5da40dc6f18de7d0690afa1fefff13955ef4ab/conda/shell/cli-32.exe
- `cli-64.exe`: `92c15cccdeecc3856c69dd7d47fe01d8d7782b6f4ada1dbd86790a5e702ea73f`
- source in conda/conda: https://github.com/conda/conda/blob/be5da40dc6f18de7d0690afa1fefff13955ef4ab/conda/shell/cli-64.exe
Binary file added crates/rattler/resources/cli-32.exe
Binary file not shown.
Binary file added crates/rattler/resources/cli-64.exe
Binary file not shown.
Binary file removed crates/rattler/resources/launcher64.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions crates/rattler/src/install/entry_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use std::{fs::File, io, io::Write, path::Path};
/// Get the bytes of the windows launcher executable.
pub fn get_windows_launcher(platform: &Platform) -> &'static [u8] {
match platform {
Platform::Win32 => unimplemented!("32 bit windows is not supported for entry points"),
Platform::Win64 => include_bytes!("../../resources/launcher64.exe"),
Platform::Win32 => include_bytes!("../../resources/cli-32.exe"),
Platform::Win64 => include_bytes!("../../resources/cli-64.exe"),
Platform::WinArm64 => unimplemented!("arm64 windows is not supported for entry points"),
_ => panic!("unsupported platform"),
}
Expand Down