Skip to content

Commit b5d126e

Browse files
authored
[build] Fix build issue on Ubuntu20 (#2857)
1 parent 33d4f05 commit b5d126e

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

Makefile

+9-19
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,15 @@ else ifeq ($(PYTHON_VER),python3.8)
142142
endif
143143
@echo "--- Virtual environment $(BLD_DIR_ENV) ready"
144144
@touch $@
145+
@echo '--- Installing PIP_MODULES in virtual-env'
146+
ifeq ($(PYTHON_VER),python2.7)
147+
@echo "--- start installing PIP_MODULES in virtual-env"
148+
@$(ENV_PIP) install --upgrade pip
149+
@$(ENV_PIP) install --upgrade --force-reinstall $(PIP_MODULES)
150+
@echo "--- done installing PIP_MODULES in virtual-env"
151+
else
152+
@echo "--- skip installing PIP_MODULES in virtual-env"
153+
endif
145154

146155
###################################
147156
# Build desktop
@@ -152,14 +161,6 @@ endif
152161
desktop: parent-pom
153162
# END DEV ONLY >>>>
154163
desktop: virtual-env
155-
# Normally dev only do "make apps", but build system is calling "make apps docs"
156-
@if [ "$(PYTHON_VER)" = "python2.7" ] && [ "$(findstring apps,$(MAKECMDGOALS))" = "apps" ]; then \
157-
echo "--- start installing PIP_MODULES"; \
158-
$(ENV_PIP) install --upgrade pip; \
159-
$(ENV_PIP) install --upgrade --force-reinstall $(PIP_MODULES); \
160-
echo "--- done installing PIP_MODULES"; \
161-
else echo "--- skip installing PIP_MODULES"; \
162-
fi
163164
@$(MAKE) -C desktop
164165

165166

@@ -220,17 +221,6 @@ install-apps:
220221
install-env:
221222
@echo --- Creating new virtual environment
222223
$(MAKE) -C $(INSTALL_DIR) virtual-env
223-
# This is needed as somehow Hue commands (app_reg, collectstatic..) import modules with hard uneeded dependencies on those.
224-
# We have two virt-env: $(ENV_PIP) aka /build/hue for build and $(PREFIX)/hue/build/env for destination.
225-
@if [ "$(PYTHON_VER)" = "python2.7" ] && [ "$(MAKECMDGOALS)" = "install" ]; then \
226-
$(PREFIX)/hue/build/env/bin/pip install $(PIP_MODULES); \
227-
fi
228-
# Alternative to ext-py directory but only due to the special case below.
229-
# Hackish way to get crypto to install with pre-compiled dependencies that now break as of today with Py2.
230-
@if [ "$(PYTHON_VER)" = "python2.7" ]; then \
231-
$(ENV_PIP) install --upgrade pip; \
232-
$(ENV_PIP) install $(PIP_MODULES); \
233-
fi
234224
@echo --- Setting up Desktop core
235225
$(MAKE) -C $(INSTALL_DIR)/desktop env-install
236226
@echo --- Setting up Applications

0 commit comments

Comments
 (0)