Skip to content

Commit

Permalink
Merge pull request #1792 from buildtesters/install_pip_automatically
Browse files Browse the repository at this point in the history
automatically install pip when sourcing setup script
  • Loading branch information
shahzebsiddiqui authored Jun 24, 2024
2 parents d4fb775 + 548b66e commit 233eb84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion setup.csh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ if (! $?BUILDTEST_ROOT) then
endif
endif

set python=python3
# install pip in user environment
curl https://bootstrap.pypa.io/get-pip.py | $python

set pip=pip3

Expand All @@ -70,7 +73,7 @@ if ( ! -x `command -v $pip` ) then
exit 1
endif

python3 -c "import buildtest.main" >& /dev/null
$python -c "import buildtest.main" >& /dev/null

# if we unable to import buildtest.main module then install buildtest dependencies
if ( $status != 0 ) then
Expand Down
6 changes: 5 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ else
exit 1
fi

python=python3

# install pip in user environment
curl https://bootstrap.pypa.io/get-pip.py | $python

pip=pip3

if ! [ -x "$(command -v $pip)" ]; then
echo "cannot find program $pip. Please see the pip documentation: https://pip.pypa.io/en/stable/installation/ on how to install pip"
exit 1
fi

python=python3

# Need 'set +e' so that process is not terminated especially when using in CI
set +e
Expand Down

0 comments on commit 233eb84

Please sign in to comment.