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

Streamlining Python Version Setup #2215

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions scripts/establish_conda_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function install_libraries()
# conda-forge
if [[ $ECE_VERBOSE == 0 ]]; then echo ... Installing libraries from conda-forge ...; fi
if [[ $USE_MAMBA == TRUE ]]; then
local PRECOMMAND=`echo conda install -n ${RAVEN_LIBS_NAME} -y -c conda-forge $MAMBA_ECE_ADD`
local PRECOMMAND=`echo conda install -n ${RAVEN_LIBS_NAME} -y -c conda-forge $MAMBA_ECE_ADD $SET_PYTHON`
if [[ $ECE_VERBOSE == 0 ]]; then echo ... conda-forge pre-command: ${PRECOMMAND}; fi
${PRECOMMAND}
local COMMAND=`echo $($PYTHON_COMMAND ${RAVEN_LIB_HANDLER} ${INSTALL_OPTIONAL} ${OSOPTION} conda --action install --subset forge --no-name)`
Expand Down Expand Up @@ -178,7 +178,7 @@ function create_libraries()
echo ... temporarily using Python $WORKING_PYTHON_COMMAND for installation
fi
if [[ $USE_MAMBA == TRUE ]]; then
local PRECOMMAND=`echo conda create -n ${RAVEN_LIBS_NAME} -y -c conda-forge $MAMBA_ECE_ADD`
local PRECOMMAND=`echo conda create -n ${RAVEN_LIBS_NAME} -y -c conda-forge $MAMBA_ECE_ADD $SET_PYTHON`
if [[ $ECE_VERBOSE == 0 ]]; then echo ... conda-forge pre-command: $PRECOMMAND; fi
${PRECOMMAND}
local COMMAND=`echo $($WORKING_PYTHON_COMMAND ${RAVEN_LIB_HANDLER} ${INSTALL_OPTIONAL} ${OSOPTION} conda --action install --subset forge --no-name)`
Expand Down Expand Up @@ -277,6 +277,9 @@ function display_usage()
echo ' --quiet'
echo ' Runs script with minimal output'
echo ''
echo ' --set-python'
echo ' Set python version in mamba setup (only used if use mamba flag is true)'
echo ''
}

function activate_env()
Expand Down Expand Up @@ -391,6 +394,10 @@ do
--no-clean)
ECE_CLEAN=1
;;
--set-python)
shift
SET_PYTHON=$1
;;
esac
shift
done
Expand Down