diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-12-03 12:08:52 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-12-03 12:08:52 +0000 |
commit | ba1c4fa94426f8e46bf0e9ab1d225039bdb78158 (patch) | |
tree | 1a279f092f44d36c8218ee2430005b6a772a83d3 /meta/packages/python/python-2.6.1 | |
parent | 3b5336f7cf1c01c23e2fd81b54fbf89558fc2cd4 (diff) | |
download | poky-ba1c4fa94426f8e46bf0e9ab1d225039bdb78158.tar.gz |
python: Update 2.5 -> 2.6 (from OE.dev)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/python/python-2.6.1')
9 files changed, 424 insertions, 0 deletions
diff --git a/meta/packages/python/python-2.6.1/00-fix-bindir-libdir-for-cross.patch b/meta/packages/python/python-2.6.1/00-fix-bindir-libdir-for-cross.patch new file mode 100644 index 0000000000..2559e3a0e4 --- /dev/null +++ b/meta/packages/python/python-2.6.1/00-fix-bindir-libdir-for-cross.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | # $(exec_prefix) points to the wrong directory, when installing | ||
2 | # a cross-build. @bindir@ and @libdir@ works better and doesn't | ||
3 | # affect the native build. | ||
4 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
5 | |||
6 | Index: Python-2.6.1/Makefile.pre.in | ||
7 | =================================================================== | ||
8 | --- Python-2.6.1.orig/Makefile.pre.in | ||
9 | +++ Python-2.6.1/Makefile.pre.in | ||
10 | @@ -86,8 +86,8 @@ exec_prefix= @exec_prefix@ | ||
11 | datarootdir= @datarootdir@ | ||
12 | |||
13 | # Expanded directories | ||
14 | -BINDIR= $(exec_prefix)/bin | ||
15 | -LIBDIR= $(exec_prefix)/lib | ||
16 | +BINDIR= @bindir@ | ||
17 | +LIBDIR= @libdir@ | ||
18 | MANDIR= @mandir@ | ||
19 | INCLUDEDIR= @includedir@ | ||
20 | CONFINCLUDEDIR= $(exec_prefix)/include | ||
diff --git a/meta/packages/python/python-2.6.1/01-use-proper-tools-for-cross-build.patch b/meta/packages/python/python-2.6.1/01-use-proper-tools-for-cross-build.patch new file mode 100644 index 0000000000..e89faa4fb0 --- /dev/null +++ b/meta/packages/python/python-2.6.1/01-use-proper-tools-for-cross-build.patch | |||
@@ -0,0 +1,116 @@ | |||
1 | # We need to ensure our host tools get run during build, not the freshly | ||
2 | # built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN. | ||
3 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
4 | |||
5 | Index: Python-2.6.1/Makefile.pre.in | ||
6 | =================================================================== | ||
7 | --- Python-2.6.1.orig/Makefile.pre.in | ||
8 | +++ Python-2.6.1/Makefile.pre.in | ||
9 | @@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ | ||
10 | |||
11 | PYTHON= python$(EXE) | ||
12 | BUILDPYTHON= python$(BUILDEXE) | ||
13 | +HOSTPYTHON= $(BUILDPYTHON) | ||
14 | |||
15 | # The task to run while instrument when building the profile-opt target | ||
16 | PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck | ||
17 | @@ -205,7 +206,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar | ||
18 | ########################################################################## | ||
19 | # Parser | ||
20 | PGEN= Parser/pgen$(EXE) | ||
21 | - | ||
22 | +HOSTPGEN= $(PGEN)$(EXE) | ||
23 | POBJS= \ | ||
24 | Parser/acceler.o \ | ||
25 | Parser/grammar1.o \ | ||
26 | @@ -394,8 +395,8 @@ platform: $(BUILDPYTHON) | ||
27 | # Build the shared modules | ||
28 | sharedmods: $(BUILDPYTHON) | ||
29 | @case $$MAKEFLAGS in \ | ||
30 | - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ | ||
31 | - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ | ||
32 | + *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ | ||
33 | + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ | ||
34 | esac | ||
35 | |||
36 | # Build static library | ||
37 | @@ -513,7 +514,7 @@ Modules/python.o: $(srcdir)/Modules/pyth | ||
38 | |||
39 | $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) | ||
40 | -@$(INSTALL) -d Include | ||
41 | - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | ||
42 | + -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | ||
43 | |||
44 | $(PGEN): $(PGENOBJS) | ||
45 | $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) | ||
46 | @@ -879,23 +880,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL | ||
47 | done | ||
48 | $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt | ||
49 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
50 | - ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
51 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
52 | -d $(LIBDEST) -f \ | ||
53 | -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) | ||
54 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
55 | - ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
56 | + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
57 | -d $(LIBDEST) -f \ | ||
58 | -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) | ||
59 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
60 | - ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
61 | + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
62 | -d $(LIBDEST)/site-packages -f \ | ||
63 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | ||
64 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
65 | - ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
66 | + $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | ||
67 | -d $(LIBDEST)/site-packages -f \ | ||
68 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | ||
69 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
70 | - ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" | ||
71 | + $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" | ||
72 | |||
73 | # Create the PLATDIR source directory, if one wasn't distributed.. | ||
74 | $(srcdir)/Lib/$(PLATDIR): | ||
75 | @@ -993,7 +994,7 @@ libainstall: all | ||
76 | # Install the dynamically loadable modules | ||
77 | # This goes into $(exec_prefix) | ||
78 | sharedinstall: | ||
79 | - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ | ||
80 | + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ | ||
81 | --prefix=$(prefix) \ | ||
82 | --install-scripts=$(BINDIR) \ | ||
83 | --install-platlib=$(DESTSHARED) \ | ||
84 | Index: Python-2.6.1/setup.py | ||
85 | =================================================================== | ||
86 | --- Python-2.6.1.orig/setup.py | ||
87 | +++ Python-2.6.1/setup.py | ||
88 | @@ -276,6 +276,7 @@ class PyBuildExt(build_ext): | ||
89 | self.failed.append(ext.name) | ||
90 | self.announce('*** WARNING: renaming "%s" since importing it' | ||
91 | ' failed: %s' % (ext.name, why), level=3) | ||
92 | + return | ||
93 | assert not self.inplace | ||
94 | basename, tail = os.path.splitext(ext_filename) | ||
95 | newname = basename + "_failed" + tail | ||
96 | @@ -310,8 +311,8 @@ class PyBuildExt(build_ext): | ||
97 | |||
98 | def detect_modules(self): | ||
99 | # Ensure that /usr/local is always used | ||
100 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
101 | - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
102 | + # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
103 | + # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
104 | |||
105 | # Add paths specified in the environment variables LDFLAGS and | ||
106 | # CPPFLAGS for header and library files. | ||
107 | @@ -410,6 +411,9 @@ class PyBuildExt(build_ext): | ||
108 | |||
109 | # XXX Omitted modules: gl, pure, dl, SGI-specific modules | ||
110 | |||
111 | + lib_dirs = [ os.getenv( "STAGING_LIBDIR" ) ] | ||
112 | + inc_dirs = [ os.getenv( "STAGING_INCDIR" ) ] | ||
113 | + | ||
114 | # | ||
115 | # The following modules are all pretty straightforward, and compile | ||
116 | # on pretty much any POSIXish platform. | ||
diff --git a/meta/packages/python/python-2.6.1/02-remove-test-for-cross.patch b/meta/packages/python/python-2.6.1/02-remove-test-for-cross.patch new file mode 100644 index 0000000000..48386ea462 --- /dev/null +++ b/meta/packages/python/python-2.6.1/02-remove-test-for-cross.patch | |||
@@ -0,0 +1,94 @@ | |||
1 | # OpenEmbedded prepopulates the autotools site cache, so if this | ||
2 | # would be using AC_TRY_CACHE, we could patch it in a more sane way | ||
3 | # Alas, I don't have enough autotalent to do that. | ||
4 | # | ||
5 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
6 | Index: Python-2.6.1/configure.in | ||
7 | =================================================================== | ||
8 | --- Python-2.6.1.orig/configure.in | ||
9 | +++ Python-2.6.1/configure.in | ||
10 | @@ -2556,38 +2556,6 @@ AC_CHECK_LIB(c, inet_aton, [$ac_cv_prog_ | ||
11 | AC_CHECK_LIB(resolv, inet_aton) | ||
12 | ) | ||
13 | |||
14 | -# On Tru64, chflags seems to be present, but calling it will | ||
15 | -# exit Python | ||
16 | -AC_MSG_CHECKING(for chflags) | ||
17 | -AC_TRY_RUN([ | ||
18 | -#include <sys/stat.h> | ||
19 | -#include <unistd.h> | ||
20 | -int main(int argc, char*argv[]) | ||
21 | -{ | ||
22 | - if(chflags(argv[0], 0) != 0) | ||
23 | - return 1; | ||
24 | - return 0; | ||
25 | -} | ||
26 | -],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.) | ||
27 | - AC_MSG_RESULT(yes), | ||
28 | - AC_MSG_RESULT(no) | ||
29 | -) | ||
30 | - | ||
31 | -AC_MSG_CHECKING(for lchflags) | ||
32 | -AC_TRY_RUN([ | ||
33 | -#include <sys/stat.h> | ||
34 | -#include <unistd.h> | ||
35 | -int main(int argc, char*argv[]) | ||
36 | -{ | ||
37 | - if(lchflags(argv[0], 0) != 0) | ||
38 | - return 1; | ||
39 | - return 0; | ||
40 | -} | ||
41 | -],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.) | ||
42 | - AC_MSG_RESULT(yes), | ||
43 | - AC_MSG_RESULT(no) | ||
44 | -) | ||
45 | - | ||
46 | dnl Check if system zlib has *Copy() functions | ||
47 | dnl | ||
48 | dnl On MacOSX the linker will search for dylibs on the entire linker path | ||
49 | @@ -3649,45 +3617,6 @@ else | ||
50 | AC_MSG_RESULT(no) | ||
51 | fi | ||
52 | |||
53 | -AC_MSG_CHECKING(for %zd printf() format support) | ||
54 | -AC_TRY_RUN([#include <stdio.h> | ||
55 | -#include <stddef.h> | ||
56 | -#include <string.h> | ||
57 | - | ||
58 | -#ifdef HAVE_SYS_TYPES_H | ||
59 | -#include <sys/types.h> | ||
60 | -#endif | ||
61 | - | ||
62 | -#ifdef HAVE_SSIZE_T | ||
63 | -typedef ssize_t Py_ssize_t; | ||
64 | -#elif SIZEOF_VOID_P == SIZEOF_LONG | ||
65 | -typedef long Py_ssize_t; | ||
66 | -#else | ||
67 | -typedef int Py_ssize_t; | ||
68 | -#endif | ||
69 | - | ||
70 | -int main() | ||
71 | -{ | ||
72 | - char buffer[256]; | ||
73 | - | ||
74 | - if(sprintf(buffer, "%zd", (size_t)123) < 0) | ||
75 | - return 1; | ||
76 | - | ||
77 | - if (strcmp(buffer, "123")) | ||
78 | - return 1; | ||
79 | - | ||
80 | - if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0) | ||
81 | - return 1; | ||
82 | - | ||
83 | - if (strcmp(buffer, "-123")) | ||
84 | - return 1; | ||
85 | - | ||
86 | - return 0; | ||
87 | -}], | ||
88 | -[AC_MSG_RESULT(yes) | ||
89 | - AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])], | ||
90 | - AC_MSG_RESULT(no)) | ||
91 | - | ||
92 | AC_CHECK_TYPE(socklen_t,, | ||
93 | AC_DEFINE(socklen_t,int, | ||
94 | Define to `int' if <sys/socket.h> does not define.),[ | ||
diff --git a/meta/packages/python/python-2.6.1/03-fix-tkinter-detection.patch b/meta/packages/python/python-2.6.1/03-fix-tkinter-detection.patch new file mode 100644 index 0000000000..a1a385a07c --- /dev/null +++ b/meta/packages/python/python-2.6.1/03-fix-tkinter-detection.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | # We need to supply STAGING_INCDIR here, otherwise the Tk headers | ||
2 | # will not be found. | ||
3 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille.de> | ||
4 | |||
5 | Index: Python-2.6.1/setup.py | ||
6 | =================================================================== | ||
7 | --- Python-2.6.1.orig/setup.py | ||
8 | +++ Python-2.6.1/setup.py | ||
9 | @@ -1543,7 +1543,7 @@ class PyBuildExt(build_ext): | ||
10 | dotversion = dotversion[:-1] + '.' + dotversion[-1] | ||
11 | tcl_include_sub = [] | ||
12 | tk_include_sub = [] | ||
13 | - for dir in inc_dirs: | ||
14 | + for dir in [os.getenv("STAGING_INCDIR")]: | ||
15 | tcl_include_sub += [dir + os.sep + "tcl" + dotversion] | ||
16 | tk_include_sub += [dir + os.sep + "tk" + dotversion] | ||
17 | tk_include_sub += tcl_include_sub | ||
18 | @@ -1562,22 +1562,6 @@ class PyBuildExt(build_ext): | ||
19 | if dir not in include_dirs: | ||
20 | include_dirs.append(dir) | ||
21 | |||
22 | - # Check for various platform-specific directories | ||
23 | - if platform == 'sunos5': | ||
24 | - include_dirs.append('/usr/openwin/include') | ||
25 | - added_lib_dirs.append('/usr/openwin/lib') | ||
26 | - elif os.path.exists('/usr/X11R6/include'): | ||
27 | - include_dirs.append('/usr/X11R6/include') | ||
28 | - added_lib_dirs.append('/usr/X11R6/lib64') | ||
29 | - added_lib_dirs.append('/usr/X11R6/lib') | ||
30 | - elif os.path.exists('/usr/X11R5/include'): | ||
31 | - include_dirs.append('/usr/X11R5/include') | ||
32 | - added_lib_dirs.append('/usr/X11R5/lib') | ||
33 | - else: | ||
34 | - # Assume default location for X11 | ||
35 | - include_dirs.append('/usr/X11/include') | ||
36 | - added_lib_dirs.append('/usr/X11/lib') | ||
37 | - | ||
38 | # If Cygwin, then verify that X is installed before proceeding | ||
39 | if platform == 'cygwin': | ||
40 | x11_inc = find_file('X11/Xlib.h', [], include_dirs) | ||
diff --git a/meta/packages/python/python-2.6.1/04-default-is-optimized.patch b/meta/packages/python/python-2.6.1/04-default-is-optimized.patch new file mode 100644 index 0000000000..805f4f696c --- /dev/null +++ b/meta/packages/python/python-2.6.1/04-default-is-optimized.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | # when compiling for an embedded system, we need every bit of | ||
2 | # performance we can get. default to optimized with the option | ||
3 | # of opt-out. | ||
4 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
5 | |||
6 | Index: Python-2.6.1/Python/compile.c | ||
7 | =================================================================== | ||
8 | --- Python-2.6.1.orig/Python/compile.c | ||
9 | +++ Python-2.6.1/Python/compile.c | ||
10 | @@ -32,7 +32,7 @@ | ||
11 | #include "symtable.h" | ||
12 | #include "opcode.h" | ||
13 | |||
14 | -int Py_OptimizeFlag = 0; | ||
15 | +int Py_OptimizeFlag = 1; | ||
16 | |||
17 | #define DEFAULT_BLOCK_SIZE 16 | ||
18 | #define DEFAULT_BLOCKS 8 | ||
19 | Index: Python-2.6.1/Modules/main.c | ||
20 | =================================================================== | ||
21 | --- Python-2.6.1.orig/Modules/main.c | ||
22 | +++ Python-2.6.1/Modules/main.c | ||
23 | @@ -40,7 +40,7 @@ static char **orig_argv; | ||
24 | static int orig_argc; | ||
25 | |||
26 | /* command line options */ | ||
27 | -#define BASE_OPTS "3bBc:dEhiJm:OQ:sStuUvVW:xX?" | ||
28 | +#define BASE_OPTS "3bBc:dEhiJm:NOQ:sStuUvVW:xX?" | ||
29 | |||
30 | #ifndef RISCOS | ||
31 | #define PROGRAM_OPTS BASE_OPTS | ||
32 | @@ -69,8 +69,7 @@ Options and arguments (and corresponding | ||
33 | static char *usage_2 = "\ | ||
34 | if stdin does not appear to be a terminal; also PYTHONINSPECT=x\n\ | ||
35 | -m mod : run library module as a script (terminates option list)\n\ | ||
36 | --O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\ | ||
37 | --OO : remove doc-strings in addition to the -O optimizations\n\ | ||
38 | +-N : do NOT optimize generated bytecode\n\ | ||
39 | -Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\ | ||
40 | -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\ | ||
41 | -S : don't imply 'import site' on initialization\n\ | ||
42 | @@ -353,8 +352,8 @@ Py_Main(int argc, char **argv) | ||
43 | |||
44 | /* case 'J': reserved for Jython */ | ||
45 | |||
46 | - case 'O': | ||
47 | - Py_OptimizeFlag++; | ||
48 | + case 'N': | ||
49 | + Py_OptimizeFlag=0; | ||
50 | break; | ||
51 | |||
52 | case 'B': | ||
diff --git a/meta/packages/python/python-2.6.1/05-enable-ctypes-cross-build.patch b/meta/packages/python/python-2.6.1/05-enable-ctypes-cross-build.patch new file mode 100644 index 0000000000..58b8078068 --- /dev/null +++ b/meta/packages/python/python-2.6.1/05-enable-ctypes-cross-build.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | # CTypes need to know the actual host we are building on. | ||
2 | # Signed-Off: Michael Dietrich <mdt@emdete.de> | ||
3 | |||
4 | Index: Python-2.6.1/setup.py | ||
5 | =================================================================== | ||
6 | --- Python-2.6.1.orig/setup.py | ||
7 | +++ Python-2.6.1/setup.py | ||
8 | @@ -1656,16 +1656,16 @@ class PyBuildExt(build_ext): | ||
9 | ffi_configfile): | ||
10 | from distutils.dir_util import mkpath | ||
11 | mkpath(ffi_builddir) | ||
12 | - config_args = [] | ||
13 | + config_args = ['--host=%s' % os.environ["HOST_SYS"], ] | ||
14 | |||
15 | # Pass empty CFLAGS because we'll just append the resulting | ||
16 | # CFLAGS to Python's; -g or -O2 is to be avoided. | ||
17 | - cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ | ||
18 | - % (ffi_builddir, ffi_srcdir, " ".join(config_args)) | ||
19 | + cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \ | ||
20 | + % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) | ||
21 | |||
22 | res = os.system(cmd) | ||
23 | if res or not os.path.exists(ffi_configfile): | ||
24 | - print "Failed to configure _ctypes module" | ||
25 | + print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile ) | ||
26 | return False | ||
27 | |||
28 | fficonfig = {} | ||
diff --git a/meta/packages/python/python-2.6.1/07-export-grammer.patch b/meta/packages/python/python-2.6.1/07-export-grammer.patch new file mode 100644 index 0000000000..b7ec2bbc65 --- /dev/null +++ b/meta/packages/python/python-2.6.1/07-export-grammer.patch | |||
@@ -0,0 +1,10 @@ | |||
1 | --- Python-2.6.1.orig/Parser/printgrammar.c 2008-04-13 15:35:56.000000000 -0500 | ||
2 | +++ Python-2.6.1/Parser/printgrammar.c 2008-12-28 00:01:28.675633800 -0600 | ||
3 | @@ -16,6 +16,7 @@ | ||
4 | fprintf(fp, "/* Generated by Parser/pgen */\n\n"); | ||
5 | fprintf(fp, "#include \"pgenheaders.h\"\n"); | ||
6 | fprintf(fp, "#include \"grammar.h\"\n"); | ||
7 | + fprintf(fp, "PyAPI_DATA(grammar) _PyParser_Grammar;\n"); | ||
8 | printdfas(g, fp); | ||
9 | printlabels(g, fp); | ||
10 | fprintf(fp, "grammar _PyParser_Grammar = {\n"); | ||
diff --git a/meta/packages/python/python-2.6.1/99-ignore-optimization-flag.patch b/meta/packages/python/python-2.6.1/99-ignore-optimization-flag.patch new file mode 100644 index 0000000000..02dc44c847 --- /dev/null +++ b/meta/packages/python/python-2.6.1/99-ignore-optimization-flag.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | # Reinstate the empty -O option to fix weird mixing of native and target | ||
2 | # binaries and libraries with LD_LIBRARY_PATH when host==target | ||
3 | # | ||
4 | # Signed-off-by: Denys Dmytriyenko <denis@denix.org> | ||
5 | |||
6 | Index: Python-2.6.1/Modules/main.c | ||
7 | =================================================================== | ||
8 | --- Python-2.6.1-orig/Modules/main.c | ||
9 | +++ Python-2.6.1/Modules/main.c | ||
10 | @@ -352,6 +352,9 @@ Py_Main(int argc, char **argv) | ||
11 | |||
12 | /* case 'J': reserved for Jython */ | ||
13 | |||
14 | + case 'O': /* ignore it */ | ||
15 | + break; | ||
16 | + | ||
17 | case 'N': | ||
18 | Py_OptimizeFlag=0; | ||
19 | break; | ||
diff --git a/meta/packages/python/python-2.6.1/sitecustomize.py b/meta/packages/python/python-2.6.1/sitecustomize.py new file mode 100644 index 0000000000..273901898a --- /dev/null +++ b/meta/packages/python/python-2.6.1/sitecustomize.py | |||
@@ -0,0 +1,45 @@ | |||
1 | # OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
2 | # GPLv2 or later | ||
3 | # Version: 20081123 | ||
4 | # Features: | ||
5 | # * set proper default encoding | ||
6 | # * enable readline completion in the interactive interpreter | ||
7 | # * load command line history on startup | ||
8 | # * save command line history on exit | ||
9 | |||
10 | import os | ||
11 | |||
12 | def __exithandler(): | ||
13 | try: | ||
14 | readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) | ||
15 | except IOError: | ||
16 | pass | ||
17 | |||
18 | def __registerExitHandler(): | ||
19 | import atexit | ||
20 | atexit.register( __exithandler ) | ||
21 | |||
22 | def __enableReadlineSupport(): | ||
23 | readline.set_history_length( 1000 ) | ||
24 | readline.parse_and_bind( "tab: complete" ) | ||
25 | try: | ||
26 | readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) ) | ||
27 | except IOError: | ||
28 | pass | ||
29 | |||
30 | def __enableDefaultEncoding(): | ||
31 | import sys | ||
32 | try: | ||
33 | sys.setdefaultencoding( "utf8" ) | ||
34 | except LookupError: | ||
35 | pass | ||
36 | |||
37 | import sys | ||
38 | try: | ||
39 | import rlcompleter, readline | ||
40 | except ImportError: | ||
41 | pass | ||
42 | else: | ||
43 | __enableDefaultEncoding() | ||
44 | __registerExitHandler() | ||
45 | __enableReadlineSupport() | ||