Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Multi-python support extension for Hue #4106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ranade1
Copy link
Contributor

@ranade1 ranade1 commented Apr 11, 2025

  • Introduced infrastructure for building and packaging Hue against multiple Python versions (3.8, 3.9, 3.10, 3.11).
  • Refactored Makefile, Makefile.vars, and various component-level Makefiles to support per-Python virtual environments under build/venvs/.
  • Removed obsolete requirements.txt and base_requirements.txt; replaced with dynamic generate_requirements.py that resolves architecture- and Python-version-specific dependencies at build time.
  • Updated environment bootstrapping (virtual-env) logic:
    • More robust handling of Python/PIP binaries across platforms.
    • Support for virtualenv-make-relocatable and .pth path rewriting via a new relocatable.py tool.
  • Enhanced build toolchain for Cloudera:
    • build_hue_cloudera.sh and build_hue_common.sh now iterate builds over supported Python versions.
    • SQLite3 installation now checks for presence and adds proper bin path.
    • Redundant shell logic simplified; system-level dependency installation made cleaner.
  • Modernized PEP 517-compliant editable install (pip install -e .) for all Python apps/libs (removed setup.py develop usage).
  • Build output (make prod, make release) now clearly logs artifact paths and validates packaging exclusions.
  • Added huecheck target for post-build diagnostics.

How was this patch tested?

  • Manual Tests
  • Test on CDH cluster

Please review Hue Contributing Guide before opening a pull request.

- Introduced infrastructure for building and packaging Hue against multiple Python versions (3.8, 3.9, 3.10, 3.11).
- Refactored `Makefile`, `Makefile.vars`, and various component-level Makefiles to support per-Python virtual environments under `build/venvs/`.
- Removed obsolete `requirements.txt` and `base_requirements.txt`; replaced with dynamic `generate_requirements.py` that resolves architecture- and Python-version-specific dependencies at build time.
- Updated environment bootstrapping (`virtual-env`) logic:
  * More robust handling of Python/PIP binaries across platforms.
  * Support for `virtualenv-make-relocatable` and `.pth` path rewriting via a new `relocatable.py` tool.
- Enhanced build toolchain for Cloudera:
  * `build_hue_cloudera.sh` and `build_hue_common.sh` now iterate builds over supported Python versions.
  * SQLite3 installation now checks for presence and adds proper bin path.
  * Redundant shell logic simplified; system-level dependency installation made cleaner.
- Modernized PEP 517-compliant editable install (`pip install -e .`) for all Python apps/libs (removed `setup.py develop` usage).
- Build output (`make prod`, `make release`) now clearly logs artifact paths and validates packaging exclusions.
- Added `huecheck` target for post-build diagnostics.
Copy link

⚠️ No test files modified. Please ensure that changes are properly tested. ⚠️

Copy link

Backend Codecov

Backend Code Coverage Report •
FileStmtsMissCoverMissing
TOTAL536032624151% 
report-only-changed-files is enabled. No files were changed during this commit :)

Pytest Report

Tests Skipped Failures Errors Time
1108 106 💤 0 ❌ 0 🔥 5m 50s ⏱️

@@ -138,30 +144,25 @@ PYBABEL := $(ROOT)/build/env/bin/pybabel
##############################
# Path to files for pip requirements
##############################
REQUIREMENT_FILE := $(ROOT)/desktop/core/requirements.txt
REQUIREMENT_DOT_FILE := $(ROOT)/desktop/core/.requirements
REQUIREMENT_TEST_FILE := $(ROOT)/desktop/core/test_requirements.txt
Copy link
Collaborator

@wing2fly wing2fly Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ranade1 did you add this file to the new generator? See here https://github.com/cloudera/hue/blob/master/Makefile#L114-L116. We need to install pytest packages.

export SYS_PYTHON="$PYTHON39_PATH/bin/python3.9"
export SYS_PIP="$PYTHON39_PATH/bin/pip3.9"
export VIRTUAL_ENV_VERSION="20.19.0"
elif [[ $PYTHON_VER == "python3.11" && ( $DOCKEROS == "redhat9" || $DOCKEROS == "redhat8" || $DOCKEROS == "sles15" ) ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add $DOCKEROS == "redhat8-arm64" in $PYTHON_VER == "python3.11"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants