-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
PR: Change logic to detect conda-based installers and micromamba on them #20827
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
Conversation
@mrclary, please rebase with master to get the fixes to our tests. Also, quick review from your message above:
I think we should keep |
It seems to me that micromamba would be redundant. The standalone executable also uses the libmamba library (@jaimergp, correct me if I'm wrong) and performs the same role in the conda-based implementation as micromamba does for our existing standalone applications. |
Not right now, since the installation code doesn't require a solver at all. Also conda-standalone has a really bad startup time (needs to self-extract), so not really useful for anything else than bootstrapping an install. |
You can add 'conda' to the base environment though, since Spyder needs a Python interpreter anyway. |
Just to be clear,
Interesting... Also, I haven't noticed any performance issues using `$ time command info -e`
We currently add Nevertheless, if there are any concerns about |
e487732
to
e57da03
Compare
Well, to give some context, the plugin is using some of the spyder functions to define what 'conda-like' executable should be used. That is done at https://github.com/spyder-ide/spyder-env-manager/blob/37f2837a077bd5dabd2b123c015c5f071826e8b9/spyder_env_manager/spyder/config.py#L24-L36 After a quick check to the changes done here, seems like that will need an update, but we are using already there the |
Yes, |
Usually it takes a few seconds to return, but maybe you have it cached already. I think |
Ahh, okay, understood.
I did notice that |
@ccordoba12, Thank you for all your feedback and taking the time to review the PR. I've marked it as draft until we investigate further some the review comments. Perhaps we can discuss some of the points at the next developer meeting. |
I changed where conda-based environments were filtered: instead of in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mrclary ! Left a couple of comments, but other than that, this LGTM 👍
df9ea36
to
2d0589b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mrclary for addressing our reviews! One last suggestion for you, then this should be ready.
… effect of reporting these values when running from conda-based installers, otherwise no effect.
is_conda_based_app checks if Spyder is from a conda-based installer. Conda-based installer is determined by existence of spyder-menu.json file in environment instead of SPYDER_APP environment variable.
…ow bundled with conda-based installers
… Spyder's mamba executable (from conda-based installers). When testing for standalone conda executable, use endswith in order to capture '_conda.exe' as well as 'conda.exe' Non-standalone conda executables are in the same directory as activate; no need to back out two directory levels and go back in. Enforce correct CONDA_EXE environment variable for conda-based installers.
… thereof, from custom interpreter list. Note that sys.executable may be a symlink for conda-based runtime environments. Windows requires USERPROFILE environment variable to find all conda environments.
…s conda-activate.[sh|bat] and get_conda_activation_script.
Co-authored-by: Carlos Cordoba <[email protected]>
Flow control in projects plugin does not need to distinguish conda-based Spyder from other installations. CLI works for macOS, Linux, and Windows. Corrected syntax to the Windows command allows for commandline arguments passed to the batch file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mrclary!
Description of Changes
pcregrep
withpcre2grep
in Github workflow sincepcre2grep
is already included in macOS runner imagespyder-menu.json
in the environment.running_in_mac_app
->is_conda_based_app
, which now determines whether the Spyder instance is a conda-based installation for any platform.is_pyinst
is obsolete and removed.run
command rather than external shell scripts.