浏览代码

HUE-8737 [py3] Refactor and remove dependencies in makefile

Romain 5 年之前
父节点
当前提交
b364698ac7
共有 4 个文件被更改,包括 20 次插入23 次删除
  1. 3 3
      Makefile.sdk
  2. 4 1
      Makefile.vars
  3. 1 3
      desktop/core/requirements.txt
  4. 12 16
      tools/docker/hue/Dockerfile.py3

+ 3 - 3
Makefile.sdk

@@ -111,13 +111,13 @@ $(EXT_PY_ENV_INSTALL_TARGETS): CUR_EXT_PY=$(notdir $(@D))
 
 #
 # ext-env-pip-install
-#   	Pip install any 3rd party package that are based on requirements_py3.txt
+#   	Pip install any 3rd party package that are based on requirements.txt
 #
 .PHONY: ext-env-pip-install
 ext-env-pip-install:
-	@echo '--- Installing requirement.txt into virtual-env via $(ENV_PIP) command to file $(REQUIREMENT_FILE).'
+	@echo '--- Installing $(REQUIREMENT_FILE) into virtual-env via $(ENV_PIP)'
 	@$(ENV_PIP) install -r $(REQUIREMENT_FILE)
-	@echo '--- Finished requirement.txt into virtual-env'
+	@echo '--- Finished $(REQUIREMENT_FILE) into virtual-env'
 	@$(ENV_PIP) install $(NAVOPTAPI_WHL)
 	@echo '--- Finished $(NAVOPTAPI_WHL) into virtual-env'
 

+ 4 - 1
Makefile.vars

@@ -42,10 +42,13 @@ VER_ERR_MSG = "Variable PYTHON_VER is $(PYTHON_VER) but it only supports python2
 PYTHON_VER ?= python2.7
 PYTHON_EXE = $(shell echo $(PYTHON_VER) | sed "s/\.//")
 
+$(info "PYTHON_VER is $(PYTHON_VER)")
+
 ifeq ($(PYTHON_VER),python2.7)
-  $(info "PYTHON_VER is $(PYTHON_VER)")
+  $(info "Python 2 module install of desktop/ext-py")
   EXT_ENV_INSTALL = ext-env-install
 else ifeq ($(shell echo $(PYTHON_VER) | head -c 8),python3.)
+  $(info "Python 3 module install via pip")
   PYTHON_VER := $(shell echo $(PYTHON_VER) | head -c 9)
   MINOR_VER = $(shell echo -n $(PYTHON_VER) | tail -c 1)
   ifeq ($(shell test $(MINOR_VER) -lt 5; echo $$?),0)

+ 1 - 3
desktop/core/requirements.txt

@@ -23,8 +23,6 @@ django-nose==1.4.5
 django_opentracing==1.1.0
 django_prometheus==1.0.15
 django-webpack-loader==0.5.0
-enum34==1.1.6
-enum-compat==0.0.2
 eventlet==0.24.1
 future==0.18.2
 greenlet==0.4.15
@@ -54,7 +52,7 @@ requests-kerberos==0.12.0
 rsa==3.4.2
 sasl==0.2.1  # Move to https://pypi.org/project/sasl3/ ?
 six==1.12.0
-SQLAlchemy==1.3.8
+SQLAlchemy==1.3.15
 sqlparse==0.2.0
 tablib==0.13.0
 thrift==0.13.0

+ 12 - 16
tools/docker/hue/Dockerfile.py3

@@ -5,20 +5,16 @@ LABEL description="Hue SQL Assistant - gethue.com"
 
 # TODO: run as hue from the start to avoid the long chmod
 
-ENV DEBIAN_FRONTEND=noninteractive
 RUN export PYTHON_VER=python3.6
 
 RUN apt-get update -y && apt-get install -y \
-  python3-pip \
-  #libmariadb-dev-compat \
-  # python3.6-dev \
-
-  #libsasl2-modules-gssapi-mit \
-  libkrb5-dev \
+  python3-pip  #libmariadb-dev-compat  # python3.6-dev \
+  libkrb5-dev  \
+  libsasl2-modules-gssapi-mit \
   libsasl2-dev \
+  libkrb5-dev \
   libxml2-dev \
-  libxslt-dev \
-  #libssl-dev \
+  libxslt-dev \ #libssl-dev \
   libmysqlclient-dev \
   libldap2-dev \
   libsnappy-dev \
@@ -27,11 +23,11 @@ RUN apt-get update -y && apt-get install -y \
 ADD . /hue
 WORKDIR /hue
 
-RUN pip3 install virtualenv
-RUN python3.6 -m venv python_env
+#RUN pip3 install virtualenv
+#RUN python3.6 -m venv python_env
 
-SHELL ["/bin/bash", "-c"]
-RUN source python_env/bin/activate
+#SHELL ["/bin/bash", "-c"]
+#RUN source python_env/bin/activate
 
 RUN pip3 install -r desktop/core/requirements.txt
 
@@ -60,12 +56,12 @@ RUN ./build/env/bin/pip install \
   redis==2.10.6 \
   django_redis \
   flower \
-  pyhive \
+  git+https://github.com/gethue/PyHive #pyhive \
   gevent \
-  # Needed for Jaeger
-  threadloop \
+  threadloop  # Needed for Jaeger \
   thrift-sasl==0.2.1
 
+
 COPY tools/docker/hue/conf desktop/conf
 COPY tools/docker/hue/startup.sh .