From 43d70de5bbbfc640cae4f92f6cb6b83226e3c673 Mon Sep 17 00:00:00 2001 From: Khushboo Vashi Date: Tue, 24 Jun 2025 15:50:45 +0530 Subject: [PATCH] Reinstall Python packages regardless of their presence in the system-wide installation. --- pkg/linux/build-functions.sh | 2 +- tools/setup-python-env.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/linux/build-functions.sh b/pkg/linux/build-functions.sh index 038d02417..567c63546 100644 --- a/pkg/linux/build-functions.sh +++ b/pkg/linux/build-functions.sh @@ -72,7 +72,7 @@ _create_python_virtualenv() { pip3 install wheel # Install the requirements - pip3 install --no-cache-dir --no-binary psycopg -r "${SOURCEDIR}/requirements.txt" + pip3 install --force-reinstall --no-cache-dir --no-binary psycopg -r "${SOURCEDIR}/requirements.txt" # Fixup the paths in the venv activation scripts sed -i 's/VIRTUAL_ENV=.*/VIRTUAL_ENV="\/usr\/pgadmin4\/venv"/g' venv/bin/activate diff --git a/tools/setup-python-env.sh b/tools/setup-python-env.sh index 43d1275d0..bb5f1b185 100755 --- a/tools/setup-python-env.sh +++ b/tools/setup-python-env.sh @@ -18,8 +18,8 @@ pip install --upgrade pip if [ ${TEST} -eq 1 ]; then echo Installing requirements for running Python tests... - pip install --no-cache-dir wheel sphinx==7.4.7 sphinxcontrib-youtube -r web/regression/requirements.txt || { echo 'ERROR: Failed to install Python requirements.' ; exit 1; } + pip install --force-reinstall --no-cache-dir wheel sphinx==7.4.7 sphinxcontrib-youtube -r web/regression/requirements.txt || { echo 'ERROR: Failed to install Python requirements.' ; exit 1; } else echo Installing requirements for executing and building only... - pip install --no-cache-dir wheel sphinx==7.4.7 sphinxcontrib-youtube -r requirements.txt || { echo 'ERROR: Failed to install Python requirements.' ; exit 1; } + pip install --force-reinstall --no-cache-dir wheel sphinx==7.4.7 sphinxcontrib-youtube -r requirements.txt || { echo 'ERROR: Failed to install Python requirements.' ; exit 1; } fi