resolved comments

This commit is contained in:
Nikita Bykov
2020-10-07 14:58:13 +03:00
parent 5d96d50f59
commit 6742dd7a54
3 changed files with 7 additions and 11 deletions

View File

@@ -8,18 +8,11 @@ pipx_packages=$(jq -r ".pipx[] .package" $toolset)
for package in $pipx_packages; do
python_version=$(jq -r ".pipx[] | select(.package == \"$package\") .python" $toolset)
if [ "$python_version" != "null" ]; then
python_path="/opt/hostedtoolcache/Python/$python_version*/x64/bin/python$python_version"
python_path="$HOME/hostedtoolcache/Python/$python_version*/x64/bin/python$python_version"
echo "Install $package into python $python_path"
pipx install $package --python $python_path
else
echo "Install $package into default python"
pipx install $package
fi
# Run tests to determine that the software installed as expected
cmd=$(jq -r ".pipx[] | select(.package == \"$package\") .cmd" $toolset)
if ! command -v $cmd; then
echo "$package was not installed"
exit 1
fi
done

View File

@@ -13,11 +13,10 @@ FORMULA_PATH=$(/usr/local/bin/brew extract python@2 local/python2 | grep "Homebr
/usr/local/bin/brew install $FORMULA_PATH
echo "Installing pipx"
export PIPX_BIN_DIR=/opt/pipx_bin
export PIPX_HOME=/opt/pipx
export PIPX_BIN_DIR=/usr/local/opt/pipx_bin
export PIPX_HOME=/usr/local/opt/pipx
brew install pipx
python3 -m pipx ensurepath
echo "export PIPX_BIN_DIR=${PIPX_BIN_DIR}" >> "${HOME}/.bashrc"
echo "export PIPX_HOME=${PIPX_HOME}" >> "${HOME}/.bashrc"

View File

@@ -31,4 +31,8 @@ Describe "Python" {
It "Pip 3 is available" {
"pip3 --version" | Should -ReturnZeroExitCode
}
It "Pipx is available" {
"pipx --version" | Should -ReturnZeroExitCode
}
}