tuhaihe commented on code in PR #1434:
URL: https://github.com/apache/cloudberry/pull/1434#discussion_r2726603476
##########
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; \
Review Comment:
Hi @gfphoenix78, thanks for raising this — the concern is valid.
We plan to update the docs
([[cloudberry-site#337](https://github.com/apache/cloudberry-site/pull/337)](https://github.com/apache/cloudberry-site/pull/337))
to recommend installing the required Python dependencies **before** building,
so in most cases this step will be skipped entirely.
In the Makefile, `pip3 install --user --break-system-packages` is
intentionally used **only as a fallback**, and only when the standard `--user`
installation is blocked on Ubuntu 24.04 due to PEP 668. The dependencies
involved here (`wheel`, `cython`) are **build-time only** and are installed
into the user site, not the system Python environment.
That said, we agree this is not ideal long-term. A cleaner approach would be
to isolate build-time Python dependencies (e.g. via a dedicated venv), which we
can consider as a follow-up improvement. This change focuses on unblocking the
Ubuntu 24.04 build while keeping backward compatibility with existing
environments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]