From a53f52a7955fb00b250884727ebd970bc20e0e65 Mon Sep 17 00:00:00 2001 From: Mike Campbell Date: Wed, 19 Jul 2023 08:58:11 -0500 Subject: [PATCH] Install src pkgs with ssh. --- install-pip-dependencies.sh | 21 ++++++++++++++++++++- install.sh | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/install-pip-dependencies.sh b/install-pip-dependencies.sh index baf1ec2..da43229 100755 --- a/install-pip-dependencies.sh +++ b/install-pip-dependencies.sh @@ -37,4 +37,23 @@ if [[ $(mpicc --version) == "IBM XL"* ]]; then exit 1 fi -pip install --src . -r "$requirements_file" +switch_requirements_to_ssh() { + input_file="$1" + output_file="$2" + + # Read the input file + while IFS= read -r line; do + # Check if the line starts with "git+https://github" + if [[ $line == git+https://github* ]]; then + # Replace "git+https://github" with "git+ssh://git@github" + modified_line=${line//git+https:\/\/github/git+ssh:\/\/git@github} + echo "$modified_line" + else + echo "$line" + fi + done < "$input_file" > "$output_file" +} + +switch_requirements_to_ssh $requirements_file ssh_requirements.txt +pip install --src . -r ssh_requirements.txt + diff --git a/install.sh b/install.sh index 767873e..ade2406 100755 --- a/install.sh +++ b/install.sh @@ -54,7 +54,7 @@ conda_env_file="" opt_modules=0 # Switch mirgecom to use ssh URL -opt_git_ssh=0 +opt_git_ssh=1 # Skip cloning mirgecom opt_skip_clone=0