Răsfoiți Sursa

[build] Fix build issue on Ubuntu20 (#2857)

Ying Chen 3 ani în urmă
părinte
comite
b5d126ea65
1 a modificat fișierele cu 9 adăugiri și 19 ștergeri
  1. 9 19
      Makefile

+ 9 - 19
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