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

Put mamba under condabin/ too #251

Merged
merged 8 commits into from
Oct 30, 2024
Merged

Conversation

jaimergp
Copy link
Member

@jaimergp jaimergp commented Sep 30, 2024

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Some users have $PREFIX/condabin in PATH, and updating to mamba 2.0 breaks their workflows because it's only putting the executable under bin/, which results in errors like executable not found etc. See https://github.com/conda-incubator/setup-miniconda/actions/runs/11083642307/job/30798086717?pr=367#step:3:906.

Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I Failed to even lint the recipe, probably because of a conda-smithy bug 😢. This likely indicates a problem in your meta.yaml, though. To get a traceback to help figure out what's going on, install conda-smithy and run conda smithy recipe-lint --conda-forge . from the recipe directory.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/mamba-feedstock/actions/runs/11103975998.

Copy link
Contributor

github-actions bot commented Sep 30, 2024

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution, @jaimergp.


:: Place mamba executable copy to condabin/
mkdir "%PREFIX%\condabin"
echo ^"%LIBRARY_BIN%\mamba.exe^" %%* > "%PREFIX%\condabin\mamba.bat"
Copy link
Contributor

@JohanMabille JohanMabille Sep 30, 2024

Choose a reason for hiding this comment

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

Thanks for your contribution! I need to check but I'm pretty sure this would break the mamba acivate / mamba deactivate features (I am swamped with fixing micromamba activate now, I'll check that right after).

Copy link
Member Author

Choose a reason for hiding this comment

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

We can also place a copy of the full executable there. Would that break activation?

@JohanMabille
Copy link
Contributor

JohanMabille commented Oct 2, 2024

Back on this, these scripts should actually be generated via mamba shell init -s cmd.exe --root-prefix=$MAMBA_DEFAULT_ENV (or any shell you want to initialise) when running the miniconda installer (same for mamba forge).

@jaimergp
Copy link
Member Author

jaimergp commented Oct 2, 2024

when running the miniconda installer

I think this should be part of the package itself. Some setups expect mamba.bat under condabin/ because it was there for 1.x, with or without initialization. We can run the initialization routines in the package building itself, like conda does. Would that work?

@JohanMabille
Copy link
Contributor

JohanMabille commented Oct 14, 2024

If the paths in.bat files are replaced when relocating packages, it should work and that should be the proper fix.

@jaimergp
Copy link
Member Author

The only mamba subcommand I can find is mamba shell hook --shell cmd.exe %PREFIX%. I think that should work, let's give it a try.

@jaimergp
Copy link
Member Author

CI now shows this for the mamba contents on Windows:

?rwxrwxrwx 0/0    1018368 2024-10-15 08:55:54 Library/bin/mamba.exe 
?rwxrwxrwx 0/0        137 2024-10-15 08:55:54 Scripts/activate.bat 
?rwxrwxrwx 0/0       1911 2024-10-15 08:55:54 condabin/_mamba_activate.bat 
?rwxrwxrwx 0/0        137 2024-10-15 08:55:54 condabin/activate.bat 
?rwxrwxrwx 0/0        874 2024-10-15 08:55:54 condabin/mamba.bat 
?rwxrwxrwx 0/0        791 2024-10-15 08:55:54 condabin/mamba_hook.bat 

@JohanMabille
Copy link
Contributor

JohanMabille commented Oct 30, 2024

@jaimergp sorry for the long time before coming back to this! Thanks for the fix ;)

@JohanMabille JohanMabille merged commit 63155fc into conda-forge:main Oct 30, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants