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

Improve standalone executable type detection and handling #864

Merged
merged 14 commits into from
Oct 1, 2024

Conversation

marcoesters
Copy link
Contributor

Description

This PR implements several improvements for how constructor detects and handles which kind of standalone (conda-standalone, micromamba, etc.) executable is used:

  • Replace string comparisons with enums for the executable types.
  • Use the result of identify_conda_exe everywhere instead of using the file name.
  • Explicitly identify mamba-type executables.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Sep 20, 2024
@marcoesters marcoesters marked this pull request as ready for review September 20, 2024 19:21
@marcoesters marcoesters requested a review from a team as a code owner September 20, 2024 19:21
exe_name, exe_version = None, None
if sys.platform != "win32" and exe_name is not None and (
exe_name == "micromamba" or Version(exe_version) < Version("23.11.0")
"Will assume it is compatible with shortcuts."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are missing the exception here, so the %s placeholder above won't be filled in.

constructor/utils.py Outdated Show resolved Hide resolved
jaimergp
jaimergp previously approved these changes Sep 28, 2024
Copy link
Contributor

@jaimergp jaimergp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the refactor! There are a couple of minor issues that need to be fixed before merging, though.

@marcoesters marcoesters linked an issue Oct 1, 2024 that may be closed by this pull request
@marcoesters marcoesters merged commit d5efecb into conda:main Oct 1, 2024
18 checks passed
@marcoesters marcoesters deleted the unify-standalone-exe-detection branch October 1, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Constructor tests failed
3 participants