Эх сурвалжийг харах

HUE-496. Make hue support newer versions of python.

Harsh J 14 жил өмнө
parent
commit
7222bf207d

+ 3 - 3
Makefile.vars

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

+ 3 - 1
tools/virtual-bootstrap/virtual-bootstrap.py

@@ -53,8 +53,10 @@ REQUIRED_MODULES = ['os', 'posix', 'posixpath', 'ntpath', 'genericpath',
                     're', 'sre', 'sre_parse', 'sre_constants', 'sre_compile',
                     'lib-dynload', 'config', 'zlib']
 
-if sys.version_info[:2] == (2, 6):
+if sys.version_info[:2] >= (2, 6):
     REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll', 'abc'])
+if sys.version_info[:2] == (2, 7):
+    REQUIRED_MODULES.extend(['_weakrefset'])
 if sys.version_info[:2] <= (2, 3):
     REQUIRED_MODULES.extend(['sets', '__future__'])
 

BIN
tools/virtual-bootstrap/virtualenv_support/setuptools-0.6c11-py2.7.egg