Browse Source

HUE-3287 [core] Django 1.11 upgrade
- Adding /opt/cloudera/python/ for RedHat 6 environment

Prakash Ranade 7 years ago
parent
commit
138572b88e
1 changed files with 5 additions and 4 deletions
  1. 5 4
      Makefile.vars

+ 5 - 4
Makefile.vars

@@ -36,18 +36,19 @@ ifneq ($(wildcard $(ROOT)/Makefile.buildvars),)
   include $(ROOT)/Makefile.buildvars
 endif
 
-PYTHON_H ?= $(shell ls /usr/include/python2.7/Python.h 2>/dev/null || ls /usr/include/python2.6/Python.h 2>/dev/null)
+PYTHON_H ?= $(shell ls /usr/include/python2.7/Python.h 2>/dev/null || ls /opt/cloudera/python/include/python2.7/Python.h 2>/dev/null)
 ifndef SKIP_PYTHONDEV_CHECK
   ifeq ($(PYTHON_H),)
-    $(error "Error: must have python development packages for 2.6 or 2.7. Could not find Python.h. Please install python2.6-devel or python2.7-devel")
+    $(error "Error: must have python development packages for 2.7. Could not find Python.h. Please install python2.7-devel")
   endif
-  SYS_PYTHON := $(shell echo $(PYTHON_H) | grep -o python2..)
+  PYTHON_VER := $(shell echo $(PYTHON_H) | grep -o python2.7)
+  SYS_PYTHON ?= $(shell ls /usr/bin/$(PYTHON_VER) 2>/dev/null || ls /opt/cloudera/python/bin/$(PYTHON_VER) 2>/dev/null)
 else
   SYS_PYTHON ?= $(shell which python)
 endif
 
 ifeq ($(SYS_PYTHON),)
-  $(error "Error: Need python version 2.6 or 2.7.")
+  $(error "Error: Need python version 2.7.")
 endif
 
 HADOOP_HOME ?= /usr/lib/hadoop