You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ch...@apache.org on 2026/04/22 15:09:04 UTC
(cloudberry) 04/06: Replace pip3 download with curl for Python deps
This is an automated email from the ASF dual-hosted git repository.
oppenheimer01 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 44a3e57f4d25441fb6a0713c0300ea1d3ccfef37
Author: Dianjin Wang <wa...@gmail.com>
AuthorDate: Fri Aug 1 16:55:26 2025 +0800
Replace pip3 download with curl for Python deps
Replace pip3 download commands with curl for downloading psutil,
PyYAML, PyGreSQL and mock packages in gpMgmt/bin/Makefile.
This change unifies the download mechanism to use curl consistently
for all Python dependencies, avoiding potential pip3 download
compatibility issues across different environments.
Changes:
- Remove pip3 download commands for psutil, PyYAML, PyGreSQL & mock
- Use curl to download packages directly from PyPI
- Maintain existing wheel and cython installation for PyYAML build
- Keep the same package versions and download locations
Also, add curl and pip3 dependency detection in configure.ac file for
better user experience. When `--with-pythonsrc-ext` option is enabled,
configure can check the required dependencies early.
---
gpMgmt/bin/Makefile | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/gpMgmt/bin/Makefile b/gpMgmt/bin/Makefile
index c863cb7bf19..3c4b6d2b031 100644
--- a/gpMgmt/bin/Makefile
+++ b/gpMgmt/bin/Makefile
@@ -90,14 +90,14 @@ PYYAML_VERSION=5.4.1
download-python-deps:
@echo "--- Downloading Python dependencies for gpMgmt modules"
@mkdir -p $(PYLIB_SRC_EXT)
- # Download psutil
- pip3 download --no-deps --no-binary :all: --no-build-isolation psutil==$(PSUTIL_VERSION) --dest $(PYLIB_SRC_EXT)/
- # Download PyYAML, wheel is for metadata vefiry;
- # cython is used for building, see https://github.com/apache/cloudberry/issues/1201
- pip3 install wheel "cython<3.0.0"
- pip3 download --no-deps --no-binary :all: --no-build-isolation PyYAML==$(PYYAML_VERSION) --dest $(PYLIB_SRC_EXT)/
- # Download PyGreSQL, the `PATH` is needed to avoid cannot find the pg_config
- PATH=$(DESTDIR)$(bindir):$$PATH pip3 download --no-deps --no-binary :all: --no-build-isolation PyGreSQL==$(PYGRESQL_VERSION) --dest $(PYLIB_SRC_EXT)/
+ # Download psutil using curl
+ curl -sSL https://files.pythonhosted.org/packages/source/p/psutil/psutil-$(PSUTIL_VERSION).tar.gz -o $(PYLIB_SRC_EXT)/psutil-$(PSUTIL_VERSION).tar.gz
+ # Download PyYAML using curl
+ curl -sSL https://files.pythonhosted.org/packages/source/P/PyYAML/PyYAML-$(PYYAML_VERSION).tar.gz -o $(PYLIB_SRC_EXT)/PyYAML-$(PYYAML_VERSION).tar.gz
+ # Download PyGreSQL using curl
+ curl -sSL https://files.pythonhosted.org/packages/source/P/PyGreSQL/PyGreSQL-$(PYGRESQL_VERSION).tar.gz -o $(PYLIB_SRC_EXT)/PyGreSQL-$(PYGRESQL_VERSION).tar.gz
+ # Install wheel and cython for PyYAML building
+ pip3 install --user wheel "cython<3.0.0"
#
# PyGreSQL
@@ -148,14 +148,14 @@ $(MOCK_BIN):
@echo "--- mock for platform $(UBUNTU_PLATFORM)"
@if [ "$(UBUNTU_PLATFORM)" = "Ubuntu" ]; then\
pip3 install mock;\
- else\
- mkdir -p $(PYLIB_SRC_EXT) && \
- pip3 download --no-deps --no-binary :all: --no-build-isolation mock==$(MOCK_VERSION) --dest $(PYLIB_SRC_EXT)/ && \
- mkdir -p $(PYTHONSRC_INSTALL_SITE) && \
- cd $(PYLIB_SRC_EXT)/ && unzip -q $(MOCK_DIR).zip && \
- cd $(PYLIB_SRC_EXT)/$(MOCK_DIR)/ && \
- PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python3 setup.py install --prefix $(PYTHONSRC_INSTALL) ; \
- fi;
+ else\
+ mkdir -p $(PYLIB_SRC_EXT) && \
+ curl -sSL https://files.pythonhosted.org/packages/source/m/mock/mock-$(MOCK_VERSION).zip -o $(PYLIB_SRC_EXT)/mock-$(MOCK_VERSION).zip && \
+ mkdir -p $(PYTHONSRC_INSTALL_SITE) && \
+ cd $(PYLIB_SRC_EXT)/ && unzip -q $(MOCK_DIR).zip && \
+ cd $(PYLIB_SRC_EXT)/$(MOCK_DIR)/ && \
+ PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python3 setup.py install --prefix $(PYTHONSRC_INSTALL) ; \
+ fi;
# -----------------------------------------------------------------------------
#
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org