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

Let user customize conda root, and check env vars. #36

Closed
wants to merge 2 commits into from

Conversation

claytharrison
Copy link

Following up from #32 (comment)_

Currently it's required for the prefix field to be set in a file's environment.yml in order for pet-virtualenv-root to find the right environment. I don't have this in any of my environment.ymls though, and it's keeping emacs-pet from finding the place where my environments live.
https://github.com/wyuenho/emacs-pet/blob/cc086d91a9e6ab0158335d37a774356414746e17/pet.el#L605C1-L609C155

I could of course add a prefix line, and doing so fixes the issue, but if I'm working on a library that's going to be used by anybody else, that line shouldn't be getting checked into the repo. It would be nice if it were possible to point emacs-pet to the micromamba (or conda, mamba - I assume) root prefix in some other way.

This PR adds a custom variable pet-condaish-root that the user can set to point to whatever folder contains their envs/, and pet-condaish-env-path to check that as well as the environment variables CONDA_ROOT and MAMBA_ROOT_PREFIX before pet-virtualenv-root errors out.

The prefix line in the environment.yml gets priority right now, then pet-condaish-root, and then the environmental variables, though I'm not sure if that's the best order or not.

@wyuenho wyuenho closed this in dc176e5 Jul 5, 2024
@wyuenho
Copy link
Owner

wyuenho commented Jul 5, 2024

Thanks for the report. I've pushed dc176e5 which doesn't require customization. Let me know if that works for you.

@claytharrison
Copy link
Author

Yes it works great, thank you!

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.

2 participants