From b5d126ea651d76e982a13c7da3661dac9a939246 Mon Sep 17 00:00:00 2001 From: Ying Chen <106372+wing2fly@users.noreply.github.com> Date: Thu, 19 May 2022 01:11:07 -0700 Subject: [PATCH] [build] Fix build issue on Ubuntu20 (#2857) --- Makefile | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 302fd44eb05..fb21ec995e2 100644 --- a/Makefile +++ b/Makefile @@ -142,6 +142,15 @@ else ifeq ($(PYTHON_VER),python3.8) endif @echo "--- Virtual environment $(BLD_DIR_ENV) ready" @touch $@ + @echo '--- Installing PIP_MODULES in virtual-env' +ifeq ($(PYTHON_VER),python2.7) + @echo "--- start installing PIP_MODULES in virtual-env" + @$(ENV_PIP) install --upgrade pip + @$(ENV_PIP) install --upgrade --force-reinstall $(PIP_MODULES) + @echo "--- done installing PIP_MODULES in virtual-env" +else + @echo "--- skip installing PIP_MODULES in virtual-env" +endif ################################### # Build desktop @@ -152,14 +161,6 @@ endif desktop: parent-pom # END DEV ONLY >>>> desktop: virtual-env - # Normally dev only do "make apps", but build system is calling "make apps docs" - @if [ "$(PYTHON_VER)" = "python2.7" ] && [ "$(findstring apps,$(MAKECMDGOALS))" = "apps" ]; then \ - echo "--- start installing PIP_MODULES"; \ - $(ENV_PIP) install --upgrade pip; \ - $(ENV_PIP) install --upgrade --force-reinstall $(PIP_MODULES); \ - echo "--- done installing PIP_MODULES"; \ - else echo "--- skip installing PIP_MODULES"; \ - fi @$(MAKE) -C desktop @@ -220,17 +221,6 @@ install-apps: install-env: @echo --- Creating new virtual environment $(MAKE) -C $(INSTALL_DIR) virtual-env - # This is needed as somehow Hue commands (app_reg, collectstatic..) import modules with hard uneeded dependencies on those. - # We have two virt-env: $(ENV_PIP) aka /build/hue for build and $(PREFIX)/hue/build/env for destination. - @if [ "$(PYTHON_VER)" = "python2.7" ] && [ "$(MAKECMDGOALS)" = "install" ]; then \ - $(PREFIX)/hue/build/env/bin/pip install $(PIP_MODULES); \ - fi - # Alternative to ext-py directory but only due to the special case below. - # Hackish way to get crypto to install with pre-compiled dependencies that now break as of today with Py2. - @if [ "$(PYTHON_VER)" = "python2.7" ]; then \ - $(ENV_PIP) install --upgrade pip; \ - $(ENV_PIP) install $(PIP_MODULES); \ - fi @echo --- Setting up Desktop core $(MAKE) -C $(INSTALL_DIR)/desktop env-install @echo --- Setting up Applications