Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions polaris
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ if [ ! -d "${dir}"/polaris-venv ] || [ "$repair" == true ]; then
rm -f "${dir}"/poetry.lock
rm -f "${dir}/client/python/poetry.lock"

is_first_time=false
if [ ! -d "${dir}/polaris-venv" ]; then
is_first_time=true
echo "Performing first-time setup for the Python client..."
python3 -m venv "${dir}"/polaris-venv
else
echo "Repair dependencies for the Python client..."
fi

rm -f "${dir}"/poetry.lock
. "${dir}"/polaris-venv/bin/activate
pip install --upgrade pip
pip install --upgrade -r regtests/requirements.txt
Expand All @@ -55,11 +56,15 @@ if [ ! -d "${dir}"/polaris-venv ] || [ "$repair" == true ]; then

deactivate

if [ ! -d ${dir}/polaris-venv ]; then
if [ "$is_first_time" == true ]; then
echo "First time setup complete."
else
echo "Dependencies repaired."
fi

if [ "$repair" == true ]; then
exit 0
fi
fi

# Check if the correct virtual environment is already active, if not, activate it.
Expand Down