diff --git a/gpMgmt/bin/Makefile b/gpMgmt/bin/Makefile index c5eb6ccba9c..7092700b784 100644 --- a/gpMgmt/bin/Makefile +++ b/gpMgmt/bin/Makefile @@ -111,8 +111,19 @@ download-python-deps: else \ echo "PyGreSQL-$(PYGRESQL_VERSION).tar.gz already exists, skipping download"; \ fi - # Install wheel and cython for PyYAML building - pip3 install --user wheel "cython<3.0.0" + # Install wheel and cython for PyYAML building (only if not exists) + @if python3 -c "import wheel" >/dev/null 2>&1; then \ + echo "wheel already exists, skipping installation"; \ + else \ + echo "Installing wheel..."; \ + pip3 install --user wheel 2>/dev/null || pip3 install --user --break-system-packages wheel; \ + fi + @if python3 -c "import cython" >/dev/null 2>&1; then \ + echo "cython already exists, skipping installation"; \ + else \ + echo "Installing cython..."; \ + pip3 install --user "cython<3.0.0" 2>/dev/null || pip3 install --user --break-system-packages "cython<3.0.0"; \ + fi # # PyGreSQL