This is an automated email from the ASF dual-hosted git repository.
djwang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push:
new 155e0a71baf Fix: Python build dependencies installation
155e0a71baf is described below
commit 155e0a71baf9a908926d0bfffad513b341ea2455
Author: Dianjin Wang <[email protected]>
AuthorDate: Wed Nov 12 14:28:23 2025 +0800
Fix: Python build dependencies installation
Improve wheel and cython dependency management in gpMgmt/bin/Makefile
to handle Ubuntu 24.04's PEP 668 restrictions while maintaining
compatibility with Rocky Linux and older Ubuntu versions.
Changes:
- Split wheel and cython dependency checks into separate commands
- Add fallback to --break-system-packages flag for Ubuntu 24.04+
- Only install dependencies if not already present in the system
- Maintain backward compatibility with existing build environments
This resolves build failures on Ubuntu 24.04 where pip install --user
is restricted by default, while preserving the existing behavior on
Rocky Linux 8/9 and Ubuntu 20.04/22.04 systems.
---
gpMgmt/bin/Makefile | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]