gforsyth / xonda

DEPRECATED: (previously a thin wrapper around conda for xonsh)
BSD 3-Clause "New" or "Revised" License
11 stars 9 forks source link

Support multiple environments directories #5

Closed StreakyCobra closed 7 years ago

StreakyCobra commented 7 years ago

This commit add the support for multiple environments directories, like having:

('/home/user/.conda/envs', '/usr/envs')

For achieving this, some other enhancements have been done:

Signed-off-by: Fabien Dubosson fabien.dubosson@gmail.com

StreakyCobra commented 7 years ago

I'm new to this, so this should probably be checked carefully. Also I've only test with Python 3.6. It should work with lower python 3 version, but I haven't checked.

gforsyth commented 7 years ago

Hey @StreakyCobra -- thanks for putting this in! I'm definitely happy to have support for multiple environment locations.

I have two concerns:

  1. This looks like it breaks env_name completion in the completer -- that should be a reasonably easy fix
  2. I recognize that the "normal" behavior of the source activate functionality is to simply prepend env bin to $PATH but I don't like that model -- conda lets us install all kinds of binaries and if you think you have something installed in an environment but you don't, then it should fail, not fall back to the version installed in your root environment. Does that make sense?
StreakyCobra commented 7 years ago

Completion problem should be fixed by 4eb31ff :+1:

For 2: In a sense yes, what you said should be valid for Python related stuff. But what about system commands, like ls? With the old code I'm not able to call basic system commands like ls, echo, etc. because /usr/bin/ is not any longer in $PATH.

If you don't have this behavior, this may be due to ArchLinux file structure.

gforsyth commented 7 years ago

With the old code I'm not able to call basic system commands like ls, echo, etc. because /usr/bin/ is not any longer in $PATH.

ahhh, gotcha. yeah, that's tricky. I use arch but not the AUR package for anaconda, so the first element on my PATH (and the most common, I think, for anaconda installs) is the anaconda/bin directory. does the arch anaconda package actually symlink the default environment stuff into /usr/bin?

gforsyth commented 7 years ago

Hey @StreakyCobra, this looks great! Thanks a ton!

StreakyCobra commented 7 years ago

My pleasure!

Thanks a ton!

Until you start getting complaints because I broke everything :smiley: