python, python-native upgrade from 2.6.5 to 2.6.6

Removed these patch:
    python-native-2.6.5/00-fix-bindir-libdir-for-cross.patch
    python/00-fix-bindir-libdir-for-cross.patch

The upstream code has changed, and it does not need the above 2 patches
(fixes) anymore.

Patches rebased to the newer code:
   python/01-use-proper-tools-for-cross-build.patch
   python/04-default-is-optimized.patch
   python/06-avoid_usr_lib_termcap_path_in_linking.patch
   python/99-ignore-optimization-flag.patch

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
This commit is contained in:
Nitin A Kamble
2010-11-08 10:34:46 -08:00
committed by Saul Wold
parent a7af5c516e
commit 793bb465b3
15 changed files with 69 additions and 111 deletions

View File

@@ -1,20 +0,0 @@
# $(exec_prefix) points to the wrong directory, when installing
# a cross-build. @bindir@ and @libdir@ works better and doesn't
# affect the native build.
# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
Index: Python-2.6.1/Makefile.pre.in
===================================================================
--- Python-2.6.1.orig/Makefile.pre.in
+++ Python-2.6.1/Makefile.pre.in
@@ -86,8 +86,8 @@ exec_prefix= @exec_prefix@
datarootdir= @datarootdir@
# Expanded directories
-BINDIR= $(exec_prefix)/bin
-LIBDIR= $(exec_prefix)/lib
+BINDIR= @bindir@
+LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include

View File

@@ -2,10 +2,10 @@
# built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
Index: Python-2.6.1/Makefile.pre.in
Index: Python-2.6.6/Makefile.pre.in
===================================================================
--- Python-2.6.1.orig/Makefile.pre.in
+++ Python-2.6.1/Makefile.pre.in
--- Python-2.6.6.orig/Makefile.pre.in
+++ Python-2.6.6/Makefile.pre.in
@@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
PYTHON= python$(EXE)
@@ -27,14 +27,14 @@ Index: Python-2.6.1/Makefile.pre.in
# Build the shared modules
sharedmods: $(BUILDPYTHON)
@case $$MAKEFLAGS in \
- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
esac
# Build static library
@@ -513,7 +514,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
@@ -517,7 +518,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
-@$(INSTALL) -d Include
@@ -43,7 +43,7 @@ Index: Python-2.6.1/Makefile.pre.in
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
@@ -879,23 +880,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL
@@ -887,23 +888,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL
done
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
@@ -72,7 +72,7 @@ Index: Python-2.6.1/Makefile.pre.in
# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
@@ -993,7 +994,7 @@ libainstall: all
@@ -1001,7 +1002,7 @@ libainstall: all
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall:
@@ -81,11 +81,11 @@ Index: Python-2.6.1/Makefile.pre.in
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
Index: Python-2.6.1/setup.py
Index: Python-2.6.6/setup.py
===================================================================
--- Python-2.6.1.orig/setup.py
+++ Python-2.6.1/setup.py
@@ -276,6 +276,7 @@ class PyBuildExt(build_ext):
--- Python-2.6.6.orig/setup.py
+++ Python-2.6.6/setup.py
@@ -322,6 +322,7 @@ class PyBuildExt(build_ext):
self.failed.append(ext.name)
self.announce('*** WARNING: renaming "%s" since importing it'
' failed: %s' % (ext.name, why), level=3)
@@ -93,7 +93,7 @@ Index: Python-2.6.1/setup.py
assert not self.inplace
basename, tail = os.path.splitext(ext_filename)
newname = basename + "_failed" + tail
@@ -310,8 +311,8 @@ class PyBuildExt(build_ext):
@@ -356,8 +357,8 @@ class PyBuildExt(build_ext):
def detect_modules(self):
# Ensure that /usr/local is always used
@@ -104,7 +104,7 @@ Index: Python-2.6.1/setup.py
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
@@ -410,6 +411,9 @@ class PyBuildExt(build_ext):
@@ -456,6 +457,9 @@ class PyBuildExt(build_ext):
# XXX Omitted modules: gl, pure, dl, SGI-specific modules

View File

@@ -3,10 +3,10 @@
# of opt-out.
# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
Index: Python-2.6.1/Python/compile.c
Index: Python-2.6.6/Python/compile.c
===================================================================
--- Python-2.6.1.orig/Python/compile.c
+++ Python-2.6.1/Python/compile.c
--- Python-2.6.6.orig/Python/compile.c
+++ Python-2.6.6/Python/compile.c
@@ -32,7 +32,7 @@
#include "symtable.h"
#include "opcode.h"
@@ -16,10 +16,10 @@ Index: Python-2.6.1/Python/compile.c
#define DEFAULT_BLOCK_SIZE 16
#define DEFAULT_BLOCKS 8
Index: Python-2.6.1/Modules/main.c
Index: Python-2.6.6/Modules/main.c
===================================================================
--- Python-2.6.1.orig/Modules/main.c
+++ Python-2.6.1/Modules/main.c
--- Python-2.6.6.orig/Modules/main.c
+++ Python-2.6.6/Modules/main.c
@@ -40,7 +40,7 @@ static char **orig_argv;
static int orig_argc;
@@ -39,14 +39,14 @@ Index: Python-2.6.1/Modules/main.c
-Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
-S : don't imply 'import site' on initialization\n\
@@ -353,8 +352,8 @@ Py_Main(int argc, char **argv)
@@ -328,8 +327,8 @@ Py_Main(int argc, char **argv)
/* case 'J': reserved for Jython */
/* case 'J': reserved for Jython */
- case 'O':
- Py_OptimizeFlag++;
+ case 'N':
+ Py_OptimizeFlag=0;
break;
- case 'O':
- Py_OptimizeFlag++;
+ case 'N':
+ Py_OptimizeFlag=0;
break;
case 'B':
case 'B':

View File

@@ -7,14 +7,14 @@ This Patch fixes this issue in the python build environment.
11 Oct 2010
Nitin A Kamble <nitin.a.kamble@intel.com>
Index: Python-2.6.5/setup.py
Index: Python-2.6.6/setup.py
===================================================================
--- Python-2.6.5.orig/setup.py
+++ Python-2.6.5/setup.py
@@ -591,12 +591,10 @@ class PyBuildExt(build_ext):
readline_libs.append('ncurses')
elif self.compiler.find_library_file(lib_dirs, 'curses'):
readline_libs.append('curses')
--- Python-2.6.6.orig/setup.py
+++ Python-2.6.6/setup.py
@@ -665,12 +665,10 @@ class PyBuildExt(build_ext):
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
- ['/usr/lib/termcap'],
+ elif self.compiler.find_library_file(lib_dirs,

View File

@@ -3,17 +3,17 @@
#
# Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Index: Python-2.6.1/Modules/main.c
Index: Python-2.6.6/Modules/main.c
===================================================================
--- Python-2.6.1-orig/Modules/main.c
+++ Python-2.6.1/Modules/main.c
@@ -352,6 +352,9 @@ Py_Main(int argc, char **argv)
--- Python-2.6.6.orig/Modules/main.c
+++ Python-2.6.6/Modules/main.c
@@ -327,6 +327,9 @@ Py_Main(int argc, char **argv)
/* case 'J': reserved for Jython */
/* case 'J': reserved for Jython */
+ case 'O': /* ignore it */
+ break;
+ case 'O': /* ignore it */
+ break;
+
case 'N':
Py_OptimizeFlag=0;
break;
case 'N':
Py_OptimizeFlag=0;
break;