Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 8abe8aa5 authored by Kostis ANAGNOSTOPOULOS's avatar Kostis ANAGNOSTOPOULOS
Browse files

FIX(setup) hack to re-add conda-env/bin into PATH >

when it is overridden by `git config vars set PATH`
since this command is run BEFORE env has been activated,
and the PATH is still the pre-activation one.

* feat: put our path 1st in env PYTHON/PATHs.
parent 4f437d4a
No related branches found
No related tags found
No related merge requests found
...@@ -225,13 +225,13 @@ function upd50_create_conda_env { ...@@ -225,13 +225,13 @@ function upd50_create_conda_env {
_log -e "already ok: $conda_env_prefix _log -e "already ok: $conda_env_prefix
Reminder, how to (re-)activate your environment: conda activate $conda_env_prefix_rel" Reminder, how to (re-)activate your environment: conda activate $conda_env_prefix_rel"
else else
_log "should take ~3' to create a conda-env@$conda_env_prefix..." _log "should take ~10' to create a conda-env@$conda_env_prefix..."
conda env create -p "$conda_env_prefix" -f environment.yml conda env create -p "$conda_env_prefix" -f environment.yml
## Setup any conda-env variables: ## Setup any conda-env variables:
# - PYTHONPATH pointing to project-root, to run scripts from there. # - PYTHONPATH pointing to project-root, to run scripts from there.
conda env config vars set -p $conda_env_prefix PATH="$PATH:$mydir/" conda env config vars set -p $conda_env_prefix PATH="$mydir:conda_env_prefix/bin:$PATH"
conda env config vars set -p $conda_env_prefix PYTHONPATH="$PYTHONPATH:$mydir/" conda env config vars set -p $conda_env_prefix PYTHONPATH="$mydir:$PYTHONPATH"
_log "ACTIVATE YOUR ENVIRONMENT with: conda activate $conda_env_prefix_rel" _log "ACTIVATE YOUR ENVIRONMENT with: conda activate $conda_env_prefix_rel"
fi fi
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment