Skip to content

Commit

Permalink
Install src pkgs with ssh.
Browse files Browse the repository at this point in the history
  • Loading branch information
MTCam committed Jul 19, 2023
1 parent b9365e6 commit a53f52a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion install-pip-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a53f52a

Please sign in to comment.