Add check for python path

This commit is contained in:
Vladimir Safonkin
2020-10-05 13:31:53 +03:00
parent 08f157956f
commit 958f252984
3 changed files with 25 additions and 7 deletions

View File

@@ -8,11 +8,17 @@
export PATH="$PATH:/opt/pipx_bin"
toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json"
pipx_packages=$(jq -r ".pipx[]" $toolset)
pipx_packages=$(jq ".pipx[] .package" $toolset)
for package in $pipx_packages; do
echo "Install $package"
python_path=$(jq ".pipx[] | select(.package == $package) .python" $toolset)
if [ "$python_path" = "default" ]; then
echo "Install $package into default python"
pipx install $package
else
echo "Install $package into python $python_path"
pipx install $package --python $python_path
fi
done
# Run tests to determine that the software installed as expected

View File

@@ -190,7 +190,13 @@
]
},
"pipx": [
"yamllint",
"aws-sam-cli"
{
"package": "yamllint",
"python": "default"
},
{
"package": "aws-sam-cli",
"python": "/opt/hostedtoolcache/Python/3.7*/x64/bin/python3.7"
}
]
}

View File

@@ -153,7 +153,13 @@
]
},
"pipx": [
"yamllint",
"aws-sam-cli"
{
"package": "yamllint",
"python": "default"
},
{
"package": "aws-sam-cli",
"python": "/opt/hostedtoolcache/Python/3.7*/x64/bin/python3.7"
}
]
}