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

Allow multiple environment path directories #292

Merged
merged 6 commits into from
Dec 6, 2020

Conversation

mcg1969
Copy link
Collaborator

@mcg1969 mcg1969 commented Dec 5, 2020

This PR modifies the interpretation of ANACONDA_PROJECT_ENVS_PATH so that multiple environment directories can be considered. Rules:

  • The variable is assumed to be a list of paths, separated by os.pathsep
  • If an entry is empty, it is replaced with envs
  • Relative paths are considered relative to the project directory (which is why envs is the appropriate default)
  • If an environment with the given name does not exist anywhere on the path list, it is created in the first directory.
  • If the directory is outside of the project directory, it is not removed by cleanup commands.
    So for example, suppose you want the default directory to still be the envs subdirectory, but you want to allow the child environments in your local Miniconda installation ~/miniconda3 to be considered. Then the value
export ANACONDA_PROJECT_ENVS_PATH=:~/miniconda3/envs

will produce the desired results.

@mcg1969
Copy link
Collaborator Author

mcg1969 commented Dec 5, 2020

The one test failure so far is a timeout on the GA side

@AlbertDeFusco
Copy link
Collaborator

Very cool.

@mcg1969
Copy link
Collaborator Author

mcg1969 commented Dec 6, 2020

Thanks... I'm very close to having persistent sessions work and this is essential for that

@mcg1969 mcg1969 merged commit 84f20e7 into anaconda:master Dec 6, 2020
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.

None yet

2 participants