Skip to content

Commit

Permalink
[build] Fix build issue on Ubuntu20 (#2857)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing2fly authored May 19, 2022
1 parent 33d4f05 commit b5d126e
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b5d126e

Please sign in to comment.