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 | |
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')
30 files changed, 1662 insertions, 0 deletions
diff --git a/meta/packages/python/python-2.6-manifest.inc b/meta/packages/python/python-2.6-manifest.inc new file mode 100644 index 0000000000..cee12c866c --- /dev/null +++ b/meta/packages/python/python-2.6-manifest.inc | |||
@@ -0,0 +1,268 @@ | |||
1 | |||
2 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. | ||
3 | # Generator: '../../contrib/python/generate-manifest-2.6.py' Version 20091004 (C) 2002-2009 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
4 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy | ||
5 | |||
6 | |||
7 | |||
8 | PROVIDES+="python-profile python-threading python-distutils python-doctest python-stringold python-codecs python-ctypes python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-core-dbg python-resource python-json python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-multiprocessing python-robotparser python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio " | ||
9 | |||
10 | PACKAGES="python-core-dbg python-profile python-threading python-distutils python-doctest python-stringold python-codecs python-ctypes python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-resource python-json python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-multiprocessing python-robotparser python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio python-modules" | ||
11 | |||
12 | DESCRIPTION_python-profile="Python Basic Profiling Support" | ||
13 | RDEPENDS_python-profile="python-core python-textutils" | ||
14 | FILES_python-profile="${libdir}/python2.6/profile.* ${libdir}/python2.6/pstats.* ${libdir}/python2.6/cProfile.* ${libdir}/python2.6/lib-dynload/_lsprof.so " | ||
15 | |||
16 | DESCRIPTION_python-threading="Python Threading & Synchronization Support" | ||
17 | RDEPENDS_python-threading="python-core python-lang" | ||
18 | FILES_python-threading="${libdir}/python2.6/_threading_local.* ${libdir}/python2.6/dummy_thread.* ${libdir}/python2.6/dummy_threading.* ${libdir}/python2.6/mutex.* ${libdir}/python2.6/threading.* ${libdir}/python2.6/Queue.* " | ||
19 | |||
20 | DESCRIPTION_python-distutils="Python Distribution Utilities" | ||
21 | RDEPENDS_python-distutils="python-core" | ||
22 | FILES_python-distutils="${libdir}/python2.6/config ${libdir}/python2.6/distutils " | ||
23 | |||
24 | DESCRIPTION_python-doctest="Python framework for running examples in docstrings." | ||
25 | RDEPENDS_python-doctest="python-core python-lang python-io python-re python-unittest python-debugger python-difflib" | ||
26 | FILES_python-doctest="${libdir}/python2.6/doctest.* " | ||
27 | |||
28 | DESCRIPTION_python-stringold="Python String APIs [deprecated]" | ||
29 | RDEPENDS_python-stringold="python-core python-re" | ||
30 | FILES_python-stringold="${libdir}/python2.6/lib-dynload/strop.so ${libdir}/python2.6/string.* " | ||
31 | |||
32 | DESCRIPTION_python-codecs="Python Codecs, Encodings & i18n Support" | ||
33 | RDEPENDS_python-codecs="python-core python-lang" | ||
34 | FILES_python-codecs="${libdir}/python2.6/codecs.* ${libdir}/python2.6/encodings ${libdir}/python2.6/gettext.* ${libdir}/python2.6/locale.* ${libdir}/python2.6/lib-dynload/_locale.so ${libdir}/python2.6/lib-dynload/unicodedata.so ${libdir}/python2.6/stringprep.* ${libdir}/python2.6/xdrlib.* " | ||
35 | |||
36 | DESCRIPTION_python-ctypes="Python C Types Support" | ||
37 | RDEPENDS_python-ctypes="python-core" | ||
38 | FILES_python-ctypes="${libdir}/python2.6/ctypes ${libdir}/python2.6/lib-dynload/_ctypes.so " | ||
39 | |||
40 | DESCRIPTION_python-pickle="Python Persistence Support" | ||
41 | RDEPENDS_python-pickle="python-core python-codecs python-io python-re" | ||
42 | FILES_python-pickle="${libdir}/python2.6/pickle.* ${libdir}/python2.6/shelve.* ${libdir}/python2.6/lib-dynload/cPickle.so " | ||
43 | |||
44 | DESCRIPTION_python-datetime="Python Calendar and Time support" | ||
45 | RDEPENDS_python-datetime="python-core python-codecs" | ||
46 | FILES_python-datetime="${libdir}/python2.6/_strptime.* ${libdir}/python2.6/calendar.* ${libdir}/python2.6/lib-dynload/datetime.so " | ||
47 | |||
48 | DESCRIPTION_python-core="Python Interpreter and core modules (needed!)" | ||
49 | RDEPENDS_python-core="" | ||
50 | FILES_python-core="${libdir}/python2.6/__future__.* ${libdir}/python2.6/_abcoll.* ${libdir}/python2.6/abc.* ${libdir}/python2.6/copy.* ${libdir}/python2.6/copy_reg.* ${libdir}/python2.6/ConfigParser.* ${libdir}/python2.6/genericpath.* ${libdir}/python2.6/getopt.* ${libdir}/python2.6/linecache.* ${libdir}/python2.6/new.* ${libdir}/python2.6/os.* ${libdir}/python2.6/posixpath.* ${libdir}/python2.6/struct.* ${libdir}/python2.6/warnings.* ${libdir}/python2.6/site.* ${libdir}/python2.6/stat.* ${libdir}/python2.6/UserDict.* ${libdir}/python2.6/UserList.* ${libdir}/python2.6/UserString.* ${libdir}/python2.6/lib-dynload/binascii.so ${libdir}/python2.6/lib-dynload/_struct.so ${libdir}/python2.6/lib-dynload/time.so ${libdir}/python2.6/lib-dynload/xreadlines.so ${libdir}/python2.6/types.* ${bindir}/python* " | ||
51 | |||
52 | DESCRIPTION_python-io="Python Low-Level I/O" | ||
53 | RDEPENDS_python-io="python-core python-math" | ||
54 | FILES_python-io="${libdir}/python2.6/lib-dynload/_socket.so ${libdir}/python2.6/lib-dynload/_ssl.so ${libdir}/python2.6/lib-dynload/select.so ${libdir}/python2.6/lib-dynload/termios.so ${libdir}/python2.6/lib-dynload/cStringIO.so ${libdir}/python2.6/pipes.* ${libdir}/python2.6/socket.* ${libdir}/python2.6/tempfile.* ${libdir}/python2.6/StringIO.* " | ||
55 | |||
56 | DESCRIPTION_python-compiler="Python Compiler Support" | ||
57 | RDEPENDS_python-compiler="python-core" | ||
58 | FILES_python-compiler="${libdir}/python2.6/compiler " | ||
59 | |||
60 | DESCRIPTION_python-compression="Python High Level Compression Support" | ||
61 | RDEPENDS_python-compression="python-core python-zlib" | ||
62 | FILES_python-compression="${libdir}/python2.6/gzip.* ${libdir}/python2.6/zipfile.* ${libdir}/python2.6/tarfile.* ${libdir}/python2.6/lib-dynload/bz2.so " | ||
63 | |||
64 | DESCRIPTION_python-re="Python Regular Expression APIs" | ||
65 | RDEPENDS_python-re="python-core" | ||
66 | FILES_python-re="${libdir}/python2.6/re.* ${libdir}/python2.6/sre.* ${libdir}/python2.6/sre_compile.* ${libdir}/python2.6/sre_constants* ${libdir}/python2.6/sre_parse.* " | ||
67 | |||
68 | DESCRIPTION_python-xmlrpc="Python XMLRPC Support" | ||
69 | RDEPENDS_python-xmlrpc="python-core python-xml python-netserver python-lang" | ||
70 | FILES_python-xmlrpc="${libdir}/python2.6/xmlrpclib.* ${libdir}/python2.6/SimpleXMLRPCServer.* " | ||
71 | |||
72 | DESCRIPTION_python-terminal="Python Terminal Controlling Support" | ||
73 | RDEPENDS_python-terminal="python-core python-io" | ||
74 | FILES_python-terminal="${libdir}/python2.6/pty.* ${libdir}/python2.6/tty.* " | ||
75 | |||
76 | DESCRIPTION_python-email="Python Email Support" | ||
77 | RDEPENDS_python-email="python-core python-io python-re python-mime python-audio python-image python-netclient" | ||
78 | FILES_python-email="${libdir}/python2.6/imaplib.* ${libdir}/python2.6/email " | ||
79 | |||
80 | DESCRIPTION_python-image="Python Graphical Image Handling" | ||
81 | RDEPENDS_python-image="python-core" | ||
82 | FILES_python-image="${libdir}/python2.6/colorsys.* ${libdir}/python2.6/imghdr.* ${libdir}/python2.6/lib-dynload/imageop.so ${libdir}/python2.6/lib-dynload/rgbimg.so " | ||
83 | |||
84 | DESCRIPTION_python-tests="Python Tests" | ||
85 | RDEPENDS_python-tests="python-core" | ||
86 | FILES_python-tests="${libdir}/python2.6/test " | ||
87 | |||
88 | DESCRIPTION_python-core-dbg="Python core module debug information" | ||
89 | RDEPENDS_python-core-dbg="python-core" | ||
90 | FILES_python-core-dbg="${libdir}/python2.6/config/.debug ${libdir}/python2.6/lib-dynload/.debug ${bindir}/.debug ${libdir}/.debug " | ||
91 | |||
92 | DESCRIPTION_python-resource="Python Resource Control Interface" | ||
93 | RDEPENDS_python-resource="python-core" | ||
94 | FILES_python-resource="${libdir}/python2.6/lib-dynload/resource.so " | ||
95 | |||
96 | DESCRIPTION_python-json="Python JSON Support" | ||
97 | RDEPENDS_python-json="python-core python-math python-re" | ||
98 | FILES_python-json="${libdir}/python2.6/json " | ||
99 | |||
100 | DESCRIPTION_python-devel="Python Development Package" | ||
101 | RDEPENDS_python-devel="python-core" | ||
102 | FILES_python-devel="${includedir} ${libdir}/libpython2.6.so ${libdir}/python2.6/config " | ||
103 | |||
104 | DESCRIPTION_python-difflib="Python helpers for computing deltas between objects." | ||
105 | RDEPENDS_python-difflib="python-lang python-re" | ||
106 | FILES_python-difflib="${libdir}/python2.6/difflib.* " | ||
107 | |||
108 | DESCRIPTION_python-math="Python Math Support" | ||
109 | RDEPENDS_python-math="python-core" | ||
110 | FILES_python-math="${libdir}/python2.6/lib-dynload/cmath.so ${libdir}/python2.6/lib-dynload/math.so ${libdir}/python2.6/lib-dynload/_random.so ${libdir}/python2.6/random.* ${libdir}/python2.6/sets.* " | ||
111 | |||
112 | DESCRIPTION_python-syslog="Python Syslog Interface" | ||
113 | RDEPENDS_python-syslog="python-core" | ||
114 | FILES_python-syslog="${libdir}/python2.6/lib-dynload/syslog.so " | ||
115 | |||
116 | DESCRIPTION_python-hotshot="Python Hotshot Profiler" | ||
117 | RDEPENDS_python-hotshot="python-core" | ||
118 | FILES_python-hotshot="${libdir}/python2.6/hotshot ${libdir}/python2.6/lib-dynload/_hotshot.so " | ||
119 | |||
120 | DESCRIPTION_python-unixadmin="Python Unix Administration Support" | ||
121 | RDEPENDS_python-unixadmin="python-core" | ||
122 | FILES_python-unixadmin="${libdir}/python2.6/lib-dynload/nis.so ${libdir}/python2.6/lib-dynload/grp.so ${libdir}/python2.6/lib-dynload/pwd.so ${libdir}/python2.6/getpass.* " | ||
123 | |||
124 | DESCRIPTION_python-textutils="Python Option Parsing, Text Wrapping and Comma-Separated-Value Support" | ||
125 | RDEPENDS_python-textutils="python-core python-io python-re python-stringold" | ||
126 | FILES_python-textutils="${libdir}/python2.6/lib-dynload/_csv.so ${libdir}/python2.6/csv.* ${libdir}/python2.6/optparse.* ${libdir}/python2.6/textwrap.* " | ||
127 | |||
128 | DESCRIPTION_python-tkinter="Python Tcl/Tk Bindings" | ||
129 | RDEPENDS_python-tkinter="python-core" | ||
130 | FILES_python-tkinter="${libdir}/python2.6/lib-dynload/_tkinter.so ${libdir}/python2.6/lib-tk " | ||
131 | |||
132 | DESCRIPTION_python-gdbm="Python GNU Database Support" | ||
133 | RDEPENDS_python-gdbm="python-core" | ||
134 | FILES_python-gdbm="${libdir}/python2.6/lib-dynload/gdbm.so " | ||
135 | |||
136 | DESCRIPTION_python-elementtree="Python elementree" | ||
137 | RDEPENDS_python-elementtree="python-core" | ||
138 | FILES_python-elementtree="${libdir}/python2.6/lib-dynload/_elementtree.so " | ||
139 | |||
140 | DESCRIPTION_python-fcntl="Python's fcntl Interface" | ||
141 | RDEPENDS_python-fcntl="python-core" | ||
142 | FILES_python-fcntl="${libdir}/python2.6/lib-dynload/fcntl.so " | ||
143 | |||
144 | DESCRIPTION_python-netclient="Python Internet Protocol Clients" | ||
145 | RDEPENDS_python-netclient="python-core python-crypt python-datetime python-io python-lang python-logging python-mime" | ||
146 | FILES_python-netclient="${libdir}/python2.6/*Cookie*.* ${libdir}/python2.6/base64.* ${libdir}/python2.6/cookielib.* ${libdir}/python2.6/ftplib.* ${libdir}/python2.6/gopherlib.* ${libdir}/python2.6/hmac.* ${libdir}/python2.6/httplib.* ${libdir}/python2.6/mimetypes.* ${libdir}/python2.6/nntplib.* ${libdir}/python2.6/poplib.* ${libdir}/python2.6/smtplib.* ${libdir}/python2.6/telnetlib.* ${libdir}/python2.6/urllib.* ${libdir}/python2.6/urllib2.* ${libdir}/python2.6/urlparse.* ${libdir}/python2.6/uuid.* ${libdir}/python2.6/rfc822.* ${libdir}/python2.6/mimetools.* " | ||
147 | |||
148 | DESCRIPTION_python-pprint="Python Pretty-Print Support" | ||
149 | RDEPENDS_python-pprint="python-core" | ||
150 | FILES_python-pprint="${libdir}/python2.6/pprint.* " | ||
151 | |||
152 | DESCRIPTION_python-netserver="Python Internet Protocol Servers" | ||
153 | RDEPENDS_python-netserver="python-core python-netclient" | ||
154 | FILES_python-netserver="${libdir}/python2.6/cgi.* ${libdir}/python2.6/*HTTPServer.* ${libdir}/python2.6/SocketServer.* " | ||
155 | |||
156 | DESCRIPTION_python-curses="Python Curses Support" | ||
157 | RDEPENDS_python-curses="python-core" | ||
158 | FILES_python-curses="${libdir}/python2.6/curses ${libdir}/python2.6/lib-dynload/_curses.so ${libdir}/python2.6/lib-dynload/_curses_panel.so " | ||
159 | |||
160 | DESCRIPTION_python-smtpd="Python Simple Mail Transport Daemon" | ||
161 | RDEPENDS_python-smtpd="python-core python-netserver python-email python-mime" | ||
162 | FILES_python-smtpd="${bindir}/smtpd.* " | ||
163 | |||
164 | DESCRIPTION_python-html="Python HTML Processing" | ||
165 | RDEPENDS_python-html="python-core" | ||
166 | FILES_python-html="${libdir}/python2.6/formatter.* ${libdir}/python2.6/htmlentitydefs.* ${libdir}/python2.6/htmllib.* ${libdir}/python2.6/markupbase.* ${libdir}/python2.6/sgmllib.* " | ||
167 | |||
168 | DESCRIPTION_python-readline="Python Readline Support" | ||
169 | RDEPENDS_python-readline="python-core" | ||
170 | FILES_python-readline="${libdir}/python2.6/lib-dynload/readline.so ${libdir}/python2.6/rlcompleter.* " | ||
171 | |||
172 | DESCRIPTION_python-subprocess="Python Subprocess Support" | ||
173 | RDEPENDS_python-subprocess="python-core python-io python-re python-fcntl python-pickle" | ||
174 | FILES_python-subprocess="${libdir}/python2.6/subprocess.* " | ||
175 | |||
176 | DESCRIPTION_python-pydoc="Python Interactive Help Support" | ||
177 | RDEPENDS_python-pydoc="python-core python-lang python-stringold python-re" | ||
178 | FILES_python-pydoc="${bindir}/pydoc ${libdir}/python2.6/pydoc.* " | ||
179 | |||
180 | DESCRIPTION_python-logging="Python Logging Support" | ||
181 | RDEPENDS_python-logging="python-core python-io python-lang python-pickle python-stringold" | ||
182 | FILES_python-logging="${libdir}/python2.6/logging " | ||
183 | |||
184 | DESCRIPTION_python-mailbox="Python Mailbox Format Support" | ||
185 | RDEPENDS_python-mailbox="python-core python-mime" | ||
186 | FILES_python-mailbox="${libdir}/python2.6/mailbox.* " | ||
187 | |||
188 | DESCRIPTION_python-xml="Python basic XML support." | ||
189 | RDEPENDS_python-xml="python-core python-re" | ||
190 | FILES_python-xml="${libdir}/python2.6/lib-dynload/pyexpat.so ${libdir}/python2.6/xml ${libdir}/python2.6/xmllib.* " | ||
191 | |||
192 | DESCRIPTION_python-mime="Python MIME Handling APIs" | ||
193 | RDEPENDS_python-mime="python-core python-io" | ||
194 | FILES_python-mime="${libdir}/python2.6/mimetools.* ${libdir}/python2.6/uu.* ${libdir}/python2.6/quopri.* ${libdir}/python2.6/rfc822.* " | ||
195 | |||
196 | DESCRIPTION_python-sqlite3="Python Sqlite3 Database Support" | ||
197 | RDEPENDS_python-sqlite3="python-core python-datetime python-lang python-crypt python-io python-threading python-zlib" | ||
198 | FILES_python-sqlite3="${libdir}/python2.6/lib-dynload/_sqlite3.so ${libdir}/python2.6/sqlite3/dbapi2.* ${libdir}/python2.6/sqlite3/__init__.* ${libdir}/python2.6/sqlite3/dump.* " | ||
199 | |||
200 | DESCRIPTION_python-sqlite3-tests="Python Sqlite3 Database Support Tests" | ||
201 | RDEPENDS_python-sqlite3-tests="python-core python-sqlite3" | ||
202 | FILES_python-sqlite3-tests="${libdir}/python2.6/sqlite3/test " | ||
203 | |||
204 | DESCRIPTION_python-unittest="Python Unit Testing Framework" | ||
205 | RDEPENDS_python-unittest="python-core python-stringold python-lang" | ||
206 | FILES_python-unittest="${libdir}/python2.6/unittest.* " | ||
207 | |||
208 | DESCRIPTION_python-multiprocessing="Python Multiprocessing Support" | ||
209 | RDEPENDS_python-multiprocessing="python-core python-io python-lang" | ||
210 | FILES_python-multiprocessing="${libdir}/python2.6/lib-dynload/_multiprocessing.so ${libdir}/python2.6/multiprocessing " | ||
211 | |||
212 | DESCRIPTION_python-robotparser="Python robots.txt parser" | ||
213 | RDEPENDS_python-robotparser="python-core python-netclient" | ||
214 | FILES_python-robotparser="${libdir}/python2.6/robotparser.* " | ||
215 | |||
216 | DESCRIPTION_python-compile="Python Bytecode Compilation Support" | ||
217 | RDEPENDS_python-compile="python-core" | ||
218 | FILES_python-compile="${libdir}/python2.6/py_compile.* ${libdir}/python2.6/compileall.* " | ||
219 | |||
220 | DESCRIPTION_python-debugger="Python Debugger" | ||
221 | RDEPENDS_python-debugger="python-core python-io python-lang python-re python-stringold python-shell python-pprint" | ||
222 | FILES_python-debugger="${libdir}/python2.6/bdb.* ${libdir}/python2.6/pdb.* " | ||
223 | |||
224 | DESCRIPTION_python-pkgutil="Python Package Extension Utility Support" | ||
225 | RDEPENDS_python-pkgutil="python-core" | ||
226 | FILES_python-pkgutil="${libdir}/python2.6/pkgutil.* " | ||
227 | |||
228 | DESCRIPTION_python-shell="Python Shell-Like Functionality" | ||
229 | RDEPENDS_python-shell="python-core python-re" | ||
230 | FILES_python-shell="${libdir}/python2.6/cmd.* ${libdir}/python2.6/commands.* ${libdir}/python2.6/dircache.* ${libdir}/python2.6/fnmatch.* ${libdir}/python2.6/glob.* ${libdir}/python2.6/popen2.* ${libdir}/python2.6/shlex.* ${libdir}/python2.6/shutil.* " | ||
231 | |||
232 | DESCRIPTION_python-bsddb="Python Berkeley Database Bindings" | ||
233 | RDEPENDS_python-bsddb="python-core" | ||
234 | FILES_python-bsddb="${libdir}/python2.6/bsddb ${libdir}/python2.6/lib-dynload/_bsddb.so " | ||
235 | |||
236 | DESCRIPTION_python-mmap="Python Memory-Mapped-File Support" | ||
237 | RDEPENDS_python-mmap="python-core python-io" | ||
238 | FILES_python-mmap="${libdir}/python2.6/lib-dynload/mmap.so " | ||
239 | |||
240 | DESCRIPTION_python-zlib="Python zlib Support." | ||
241 | RDEPENDS_python-zlib="python-core" | ||
242 | FILES_python-zlib="${libdir}/python2.6/lib-dynload/zlib.so " | ||
243 | |||
244 | DESCRIPTION_python-db="Python File-Based Database Support" | ||
245 | RDEPENDS_python-db="python-core" | ||
246 | FILES_python-db="${libdir}/python2.6/anydbm.* ${libdir}/python2.6/dumbdbm.* ${libdir}/python2.6/whichdb.* " | ||
247 | |||
248 | DESCRIPTION_python-crypt="Python Basic Cryptographic and Hashing Support" | ||
249 | RDEPENDS_python-crypt="python-core" | ||
250 | FILES_python-crypt="${libdir}/python2.6/hashlib.* ${libdir}/python2.6/md5.* ${libdir}/python2.6/sha.* ${libdir}/python2.6/lib-dynload/crypt.so ${libdir}/python2.6/lib-dynload/_hashlib.so ${libdir}/python2.6/lib-dynload/_sha256.so ${libdir}/python2.6/lib-dynload/_sha512.so " | ||
251 | |||
252 | DESCRIPTION_python-idle="Python Integrated Development Environment" | ||
253 | RDEPENDS_python-idle="python-core python-tkinter" | ||
254 | FILES_python-idle="${bindir}/idle ${libdir}/python2.6/idlelib " | ||
255 | |||
256 | DESCRIPTION_python-lang="Python Low-Level Language Support" | ||
257 | RDEPENDS_python-lang="python-core" | ||
258 | FILES_python-lang="${libdir}/python2.6/lib-dynload/_bisect.so ${libdir}/python2.6/lib-dynload/_collections.so ${libdir}/python2.6/lib-dynload/_heapq.so ${libdir}/python2.6/lib-dynload/_weakref.so ${libdir}/python2.6/lib-dynload/_functools.so ${libdir}/python2.6/lib-dynload/array.so ${libdir}/python2.6/lib-dynload/itertools.so ${libdir}/python2.6/lib-dynload/operator.so ${libdir}/python2.6/lib-dynload/parser.so ${libdir}/python2.6/atexit.* ${libdir}/python2.6/bisect.* ${libdir}/python2.6/code.* ${libdir}/python2.6/codeop.* ${libdir}/python2.6/collections.* ${libdir}/python2.6/dis.* ${libdir}/python2.6/functools.* ${libdir}/python2.6/heapq.* ${libdir}/python2.6/inspect.* ${libdir}/python2.6/keyword.* ${libdir}/python2.6/opcode.* ${libdir}/python2.6/symbol.* ${libdir}/python2.6/repr.* ${libdir}/python2.6/token.* ${libdir}/python2.6/tokenize.* ${libdir}/python2.6/traceback.* ${libdir}/python2.6/linecache.* ${libdir}/python2.6/weakref.* " | ||
259 | |||
260 | DESCRIPTION_python-audio="Python Audio Handling" | ||
261 | RDEPENDS_python-audio="python-core" | ||
262 | FILES_python-audio="${libdir}/python2.6/wave.* ${libdir}/python2.6/chunk.* ${libdir}/python2.6/sndhdr.* ${libdir}/python2.6/lib-dynload/ossaudiodev.so ${libdir}/python2.6/lib-dynload/audioop.so " | ||
263 | |||
264 | DESCRIPTION_python-modules="All Python modules" | ||
265 | RDEPENDS_python-modules="python-profile python-threading python-distutils python-doctest python-stringold python-codecs python-ctypes python-pickle python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-resource python-json python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-multiprocessing python-robotparser python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio " | ||
266 | ALLOW_EMPTY_python-modules = "1" | ||
267 | |||
268 | |||
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() | ||
diff --git a/meta/packages/python/python-2.6.2/00-fix-bindir-libdir-for-cross.patch b/meta/packages/python/python-2.6.2/00-fix-bindir-libdir-for-cross.patch new file mode 100644 index 0000000000..2559e3a0e4 --- /dev/null +++ b/meta/packages/python/python-2.6.2/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.2/01-use-proper-tools-for-cross-build.patch b/meta/packages/python/python-2.6.2/01-use-proper-tools-for-cross-build.patch new file mode 100644 index 0000000000..e89faa4fb0 --- /dev/null +++ b/meta/packages/python/python-2.6.2/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.2/02-remove-test-for-cross.patch b/meta/packages/python/python-2.6.2/02-remove-test-for-cross.patch new file mode 100644 index 0000000000..48386ea462 --- /dev/null +++ b/meta/packages/python/python-2.6.2/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.2/03-fix-tkinter-detection.patch b/meta/packages/python/python-2.6.2/03-fix-tkinter-detection.patch new file mode 100644 index 0000000000..a1a385a07c --- /dev/null +++ b/meta/packages/python/python-2.6.2/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.2/04-default-is-optimized.patch b/meta/packages/python/python-2.6.2/04-default-is-optimized.patch new file mode 100644 index 0000000000..805f4f696c --- /dev/null +++ b/meta/packages/python/python-2.6.2/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.2/05-enable-ctypes-cross-build.patch b/meta/packages/python/python-2.6.2/05-enable-ctypes-cross-build.patch new file mode 100644 index 0000000000..58b8078068 --- /dev/null +++ b/meta/packages/python/python-2.6.2/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.2/99-ignore-optimization-flag.patch b/meta/packages/python/python-2.6.2/99-ignore-optimization-flag.patch new file mode 100644 index 0000000000..02dc44c847 --- /dev/null +++ b/meta/packages/python/python-2.6.2/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.2/sitecustomize.py b/meta/packages/python/python-2.6.2/sitecustomize.py new file mode 100644 index 0000000000..273901898a --- /dev/null +++ b/meta/packages/python/python-2.6.2/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() | ||
diff --git a/meta/packages/python/python-native-2.6.1/00-fix-bindir-libdir-for-cross.patch b/meta/packages/python/python-native-2.6.1/00-fix-bindir-libdir-for-cross.patch new file mode 100644 index 0000000000..2559e3a0e4 --- /dev/null +++ b/meta/packages/python/python-native-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-native-2.6.1/04-default-is-optimized.patch b/meta/packages/python/python-native-2.6.1/04-default-is-optimized.patch new file mode 100644 index 0000000000..5131e0ba69 --- /dev/null +++ b/meta/packages/python/python-native-2.6.1/04-default-is-optimized.patch | |||
@@ -0,0 +1,18 @@ | |||
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 | ||
diff --git a/meta/packages/python/python-native-2.6.1/10-distutils-fix-swig-parameter.patch b/meta/packages/python/python-native-2.6.1/10-distutils-fix-swig-parameter.patch new file mode 100644 index 0000000000..f5e852a118 --- /dev/null +++ b/meta/packages/python/python-native-2.6.1/10-distutils-fix-swig-parameter.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | # Some versions of SWIG do not use the extension parameter. | ||
2 | # Make it optional. | ||
3 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
4 | Index: Python-2.6.1/Lib/distutils/command/build_ext.py | ||
5 | =================================================================== | ||
6 | --- Python-2.6.1.orig/Lib/distutils/command/build_ext.py | ||
7 | +++ Python-2.6.1/Lib/distutils/command/build_ext.py | ||
8 | @@ -566,7 +566,7 @@ class build_ext (Command): | ||
9 | target_lang=language) | ||
10 | |||
11 | |||
12 | - def swig_sources (self, sources, extension): | ||
13 | + def swig_sources (self, sources, extension=None): | ||
14 | |||
15 | """Walk the list of source files in 'sources', looking for SWIG | ||
16 | interface (.i) files. Run SWIG on all that are found, and | ||
diff --git a/meta/packages/python/python-native-2.6.1/11-distutils-never-modify-shebang-line.patch b/meta/packages/python/python-native-2.6.1/11-distutils-never-modify-shebang-line.patch new file mode 100644 index 0000000000..8354e266fa --- /dev/null +++ b/meta/packages/python/python-native-2.6.1/11-distutils-never-modify-shebang-line.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | # Don't modify the she-bang line for a cross-build. | ||
2 | # Otherwise it points to our hostpython (which we do not want) | ||
3 | # | ||
4 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
5 | |||
6 | Index: Python-2.6.1/Lib/distutils/command/build_scripts.py | ||
7 | =================================================================== | ||
8 | --- Python-2.6.1.orig/Lib/distutils/command/build_scripts.py | ||
9 | +++ Python-2.6.1/Lib/distutils/command/build_scripts.py | ||
10 | @@ -87,7 +87,7 @@ class build_scripts (Command): | ||
11 | continue | ||
12 | |||
13 | match = first_line_re.match(first_line) | ||
14 | - if match: | ||
15 | + if False: #match: | ||
16 | adjust = 1 | ||
17 | post_interp = match.group(1) or '' | ||
18 | |||
diff --git a/meta/packages/python/python-native-2.6.1/12-distutils-prefix-is-inside-staging-area.patch b/meta/packages/python/python-native-2.6.1/12-distutils-prefix-is-inside-staging-area.patch new file mode 100644 index 0000000000..aa4393679f --- /dev/null +++ b/meta/packages/python/python-native-2.6.1/12-distutils-prefix-is-inside-staging-area.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | # The proper prefix is inside our staging area. | ||
2 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
3 | |||
4 | Index: Python-2.6.1/Lib/distutils/sysconfig.py | ||
5 | =================================================================== | ||
6 | --- Python-2.6.1.orig/Lib/distutils/sysconfig.py | ||
7 | +++ Python-2.6.1/Lib/distutils/sysconfig.py | ||
8 | @@ -19,8 +19,8 @@ import sys | ||
9 | from distutils.errors import DistutilsPlatformError | ||
10 | |||
11 | # These are needed in a couple of spots, so just compute them once. | ||
12 | -PREFIX = os.path.normpath(sys.prefix) | ||
13 | -EXEC_PREFIX = os.path.normpath(sys.exec_prefix) | ||
14 | +PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) | ||
15 | +EXEC_PREFIX = os.path.normpath(sys.exec_prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) | ||
16 | |||
17 | # Path to the base directory of the project. On Windows the binary may | ||
18 | # live in project/PCBuild9. If we're dealing with an x64 Windows build, | ||
19 | @@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref | ||
20 | sys.exec_prefix -- i.e., ignore 'plat_specific'. | ||
21 | """ | ||
22 | if prefix is None: | ||
23 | - prefix = plat_specific and EXEC_PREFIX or PREFIX | ||
24 | + if plat_specific: | ||
25 | + prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include') | ||
26 | + else: | ||
27 | + prefix = plat_specific and EXEC_PREFIX or PREFIX | ||
28 | if os.name == "posix": | ||
29 | if python_build: | ||
30 | base = os.path.dirname(os.path.abspath(sys.executable)) | ||
31 | @@ -112,7 +115,10 @@ def get_python_lib(plat_specific=0, stan | ||
32 | sys.exec_prefix -- i.e., ignore 'plat_specific'. | ||
33 | """ | ||
34 | if prefix is None: | ||
35 | - prefix = plat_specific and EXEC_PREFIX or PREFIX | ||
36 | + if plat_specific: | ||
37 | + prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip('lib') | ||
38 | + else: | ||
39 | + prefix = plat_specific and EXEC_PREFIX or PREFIX | ||
40 | |||
41 | if os.name == "posix": | ||
42 | libpython = os.path.join(prefix, | ||
43 | @@ -218,7 +218,7 @@ def get_config_h_filename(): | ||
44 | else: | ||
45 | # The name of the config.h file changed in 2.2 | ||
46 | config_h = 'pyconfig.h' | ||
47 | - return os.path.join(inc_dir, config_h) | ||
48 | + return os.path.join(inc_dir, config_h).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) | ||
49 | |||
50 | |||
51 | def get_makefile_filename(): | ||
52 | @@ -226,7 +226,7 @@ def get_makefile_filename(): | ||
53 | if python_build: | ||
54 | return os.path.join(os.path.dirname(sys.executable), "Makefile") | ||
55 | lib_dir = get_python_lib(plat_specific=1, standard_lib=1) | ||
56 | - return os.path.join(lib_dir, "config", "Makefile") | ||
57 | + return os.path.join(lib_dir, "config", "Makefile").replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") ) | ||
58 | |||
59 | |||
60 | def parse_config_h(fp, g=None): | ||
diff --git a/meta/packages/python/python-native-2.6.1/debug.patch b/meta/packages/python/python-native-2.6.1/debug.patch new file mode 100644 index 0000000000..beb3adc6db --- /dev/null +++ b/meta/packages/python/python-native-2.6.1/debug.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Index: Python-2.6.1/Lib/distutils/unixccompiler.py | ||
2 | =================================================================== | ||
3 | --- Python-2.6.1.orig/Lib/distutils/unixccompiler.py 2009-11-13 16:04:54.000000000 +0000 | ||
4 | +++ Python-2.6.1/Lib/distutils/unixccompiler.py 2009-11-13 16:06:27.000000000 +0000 | ||
5 | @@ -300,6 +300,8 @@ | ||
6 | dylib_f = self.library_filename(lib, lib_type='dylib') | ||
7 | static_f = self.library_filename(lib, lib_type='static') | ||
8 | |||
9 | + print "Looking in %s for %s" % (lib, dirs) | ||
10 | + | ||
11 | for dir in dirs: | ||
12 | shared = os.path.join(dir, shared_f) | ||
13 | dylib = os.path.join(dir, dylib_f) | ||
14 | @@ -309,10 +311,13 @@ | ||
15 | # assuming that *all* Unix C compilers do. And of course I'm | ||
16 | # ignoring even GCC's "-static" option. So sue me. | ||
17 | if os.path.exists(dylib): | ||
18 | + print "Found %s" % (dylib) | ||
19 | return dylib | ||
20 | elif os.path.exists(shared): | ||
21 | + print "Found %s" % (shared) | ||
22 | return shared | ||
23 | elif os.path.exists(static): | ||
24 | + print "Found %s" % (static) | ||
25 | return static | ||
26 | |||
27 | # Oops, didn't find it in *any* of 'dirs' | ||
diff --git a/meta/packages/python/python-native-2.6.1/nohostlibs.patch b/meta/packages/python/python-native-2.6.1/nohostlibs.patch new file mode 100644 index 0000000000..7020f3c2a9 --- /dev/null +++ b/meta/packages/python/python-native-2.6.1/nohostlibs.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | Index: Python-2.6.1/setup.py | ||
2 | =================================================================== | ||
3 | --- Python-2.6.1.orig/setup.py 2009-11-13 16:20:47.000000000 +0000 | ||
4 | +++ Python-2.6.1/setup.py 2009-11-13 16:28:00.000000000 +0000 | ||
5 | @@ -310,8 +310,8 @@ | ||
6 | |||
7 | def detect_modules(self): | ||
8 | # Ensure that /usr/local is always used | ||
9 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
10 | - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
11 | + #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
12 | + #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
13 | |||
14 | # Add paths specified in the environment variables LDFLAGS and | ||
15 | # CPPFLAGS for header and library files. | ||
16 | @@ -347,10 +347,10 @@ | ||
17 | for directory in reversed(options.dirs): | ||
18 | add_dir_to_list(dir_list, directory) | ||
19 | |||
20 | - if os.path.normpath(sys.prefix) != '/usr': | ||
21 | - add_dir_to_list(self.compiler.library_dirs, | ||
22 | + | ||
23 | + add_dir_to_list(self.compiler.library_dirs, | ||
24 | sysconfig.get_config_var("LIBDIR")) | ||
25 | - add_dir_to_list(self.compiler.include_dirs, | ||
26 | + add_dir_to_list(self.compiler.include_dirs, | ||
27 | sysconfig.get_config_var("INCLUDEDIR")) | ||
28 | |||
29 | try: | ||
30 | @@ -361,11 +361,8 @@ | ||
31 | # lib_dirs and inc_dirs are used to search for files; | ||
32 | # if a file is found in one of those directories, it can | ||
33 | # be assumed that no additional -I,-L directives are needed. | ||
34 | - lib_dirs = self.compiler.library_dirs + [ | ||
35 | - '/lib64', '/usr/lib64', | ||
36 | - '/lib', '/usr/lib', | ||
37 | - ] | ||
38 | - inc_dirs = self.compiler.include_dirs + ['/usr/include'] | ||
39 | + lib_dirs = self.compiler.library_dirs | ||
40 | + inc_dirs = self.compiler.include_dirs | ||
41 | exts = [] | ||
42 | missing = [] | ||
43 | |||
44 | @@ -583,8 +580,7 @@ | ||
45 | readline_libs.append('ncurses') | ||
46 | elif self.compiler.find_library_file(lib_dirs, 'curses'): | ||
47 | readline_libs.append('curses') | ||
48 | - elif self.compiler.find_library_file(lib_dirs + | ||
49 | - ['/usr/lib/termcap'], | ||
50 | + elif self.compiler.find_library_file(lib_dirs, | ||
51 | 'termcap'): | ||
52 | readline_libs.append('termcap') | ||
53 | exts.append( Extension('readline', ['readline.c'], | ||
diff --git a/meta/packages/python/python-native-2.6.1/sitecustomize.py b/meta/packages/python/python-native-2.6.1/sitecustomize.py new file mode 100644 index 0000000000..273901898a --- /dev/null +++ b/meta/packages/python/python-native-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() | ||
diff --git a/meta/packages/python/python-native_2.6.1.bb b/meta/packages/python/python-native_2.6.1.bb new file mode 100644 index 0000000000..3acd1babe9 --- /dev/null +++ b/meta/packages/python/python-native_2.6.1.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | require python.inc | ||
2 | DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native" | ||
3 | PR = "${INC_PR}.2" | ||
4 | |||
5 | SRC_URI = "\ | ||
6 | http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ | ||
7 | file://00-fix-bindir-libdir-for-cross.patch;patch=1 \ | ||
8 | file://04-default-is-optimized.patch;patch=1 \ | ||
9 | file://05-enable-ctypes-cross-build.patch;patch=1 \ | ||
10 | file://10-distutils-fix-swig-parameter.patch;patch=1 \ | ||
11 | file://11-distutils-never-modify-shebang-line.patch;patch=1 \ | ||
12 | file://12-distutils-prefix-is-inside-staging-area.patch;patch=1 \ | ||
13 | file://debug.patch;patch=1 \ | ||
14 | file://nohostlibs.patch;patch=1 \ | ||
15 | " | ||
16 | S = "${WORKDIR}/Python-${PV}" | ||
17 | |||
18 | inherit native | ||
19 | |||
20 | EXTRA_OEMAKE = '\ | ||
21 | BUILD_SYS="" \ | ||
22 | HOST_SYS="" \ | ||
23 | LIBC="" \ | ||
24 | STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ | ||
25 | STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ | ||
26 | ' | ||
27 | |||
28 | NATIVE_INSTALL_WORKS = "1" | ||
29 | do_install() { | ||
30 | oe_runmake 'DESTDIR=${D}' install | ||
31 | install -d ${D}${bindir}/ | ||
32 | install -m 0755 Parser/pgen ${D}${bindir}/ | ||
33 | } | ||
diff --git a/meta/packages/python/python.inc b/meta/packages/python/python.inc new file mode 100644 index 0000000000..7e61f795ba --- /dev/null +++ b/meta/packages/python/python.inc | |||
@@ -0,0 +1,23 @@ | |||
1 | DESCRIPTION = "The Python Programming Language" | ||
2 | HOMEPAGE = "http://www.python.org" | ||
3 | LICENSE = "PSF" | ||
4 | SECTION = "devel/python" | ||
5 | PRIORITY = "optional" | ||
6 | # bump this on every change in contrib/python/generate-manifest-2.6.py | ||
7 | INC_PR = "ml8" | ||
8 | |||
9 | DEFAULT_PREFERENCE = "-26" | ||
10 | |||
11 | PYTHON_MAJMIN = "2.6" | ||
12 | |||
13 | inherit autotools | ||
14 | |||
15 | EXTRA_OECONF = "\ | ||
16 | --with-threads \ | ||
17 | --with-pymalloc \ | ||
18 | --with-cyclic-gc \ | ||
19 | --without-cxx \ | ||
20 | --with-signal-module \ | ||
21 | --with-wctype-functions \ | ||
22 | --enable-shared \ | ||
23 | " | ||
diff --git a/meta/packages/python/python_2.6.1.bb b/meta/packages/python/python_2.6.1.bb new file mode 100644 index 0000000000..46e14f84e7 --- /dev/null +++ b/meta/packages/python/python_2.6.1.bb | |||
@@ -0,0 +1,113 @@ | |||
1 | require python.inc | ||
2 | DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib" | ||
3 | DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" | ||
4 | PR = "${INC_PR}.0" | ||
5 | |||
6 | SRC_URI = "\ | ||
7 | http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ | ||
8 | file://00-fix-bindir-libdir-for-cross.patch;patch=1 \ | ||
9 | file://01-use-proper-tools-for-cross-build.patch;patch=1 \ | ||
10 | file://02-remove-test-for-cross.patch;patch=1 \ | ||
11 | file://03-fix-tkinter-detection.patch;patch=1 \ | ||
12 | file://04-default-is-optimized.patch;patch=1 \ | ||
13 | file://05-enable-ctypes-cross-build.patch;patch=1 \ | ||
14 | file://06-libffi-enable-default-mips.patch;patch=1 \ | ||
15 | file://07-export-grammer.patch;patch=1 \ | ||
16 | file://99-ignore-optimization-flag.patch;patch=1 \ | ||
17 | \ | ||
18 | # not yet pushed forward | ||
19 | # sitecustomize, sitebranding | ||
20 | \ | ||
21 | # file://05-install.patch;patch=1 \ | ||
22 | # file://06-fix-urllib-exception.patch;patch=1 \ | ||
23 | # file://16-bug1179-imageop.patch;patch=1 \ | ||
24 | # file://13-set-wakeup-fix.patch;patch=1 \ | ||
25 | \ | ||
26 | file://sitecustomize.py \ | ||
27 | " | ||
28 | S = "${WORKDIR}/Python-${PV}" | ||
29 | |||
30 | inherit autotools | ||
31 | |||
32 | # The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources | ||
33 | #Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :( | ||
34 | TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__" | ||
35 | TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" | ||
36 | |||
37 | # | ||
38 | # copy config.h and an appropriate Makefile for distutils.sysconfig | ||
39 | # which laters uses the information out of these to compile extensions | ||
40 | # | ||
41 | do_compile_prepend() { | ||
42 | install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/ | ||
43 | install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ | ||
44 | install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/ | ||
45 | install -m 0644 Makefile Makefile.orig | ||
46 | install -m 0644 Makefile Makefile.backup | ||
47 | sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile | ||
48 | install -m 0644 Makefile Makefile.backup | ||
49 | sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile | ||
50 | install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ | ||
51 | } | ||
52 | |||
53 | do_compile() { | ||
54 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | ||
55 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | ||
56 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
57 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
58 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
59 | OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so | ||
60 | |||
61 | oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR} | ||
62 | |||
63 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | ||
64 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | ||
65 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
66 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
67 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
68 | OPT="${CFLAGS}" | ||
69 | } | ||
70 | |||
71 | do_install() { | ||
72 | install -m 0644 Makefile.orig Makefile | ||
73 | |||
74 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | ||
75 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | ||
76 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
77 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
78 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
79 | DESTDIR=${D} LIBDIR=${libdir} install | ||
80 | |||
81 | install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} | ||
82 | |||
83 | # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144 | ||
84 | sed -i -e s,ccache,'$(CCACHE)', ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile | ||
85 | } | ||
86 | |||
87 | require python-${PYTHON_MAJMIN}-manifest.inc | ||
88 | |||
89 | # manual dependency additions | ||
90 | RPROVIDES_python-core = "python" | ||
91 | RRECOMMENDS_python-core = "python-readline" | ||
92 | RRECOMMENDS_python-crypt = "openssl" | ||
93 | |||
94 | # add sitecustomize | ||
95 | FILES_python-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py" | ||
96 | |||
97 | # 2to3 | ||
98 | FILES_python-core += "${bindir}/2to3" | ||
99 | |||
100 | # package libpython | ||
101 | PACKAGES =+ "libpython2" | ||
102 | FILES_libpython2 = "${libdir}/libpython*.so.*" | ||
103 | |||
104 | # catch debug extensions (isn't that already in python-core-dbg?) | ||
105 | FILES_python-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug" | ||
106 | |||
107 | # catch all the rest (unsorted) | ||
108 | PACKAGES += "python-misc" | ||
109 | FILES_python-misc = "${libdir}/python${PYTHON_MAJMIN}" | ||
110 | |||
111 | # catch manpage | ||
112 | PACKAGES += "python-man" | ||
113 | FILES_python-man = "${datadir}/man" | ||
diff --git a/meta/packages/python/python_2.6.2.bb b/meta/packages/python/python_2.6.2.bb new file mode 100644 index 0000000000..c996b0b5c4 --- /dev/null +++ b/meta/packages/python/python_2.6.2.bb | |||
@@ -0,0 +1,130 @@ | |||
1 | require python.inc | ||
2 | DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib" | ||
3 | DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" | ||
4 | # set to .0 on every increase of INC_PR | ||
5 | PR = "${INC_PR}.0" | ||
6 | |||
7 | SRC_URI = "\ | ||
8 | http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ | ||
9 | file://00-fix-bindir-libdir-for-cross.patch;patch=1 \ | ||
10 | file://01-use-proper-tools-for-cross-build.patch;patch=1 \ | ||
11 | file://02-remove-test-for-cross.patch;patch=1 \ | ||
12 | file://03-fix-tkinter-detection.patch;patch=1 \ | ||
13 | file://04-default-is-optimized.patch;patch=1 \ | ||
14 | file://05-enable-ctypes-cross-build.patch;patch=1 \ | ||
15 | file://99-ignore-optimization-flag.patch;patch=1 \ | ||
16 | \ | ||
17 | # not yet pushed forward | ||
18 | # sitebranding | ||
19 | \ | ||
20 | # file://05-install.patch;patch=1 \ | ||
21 | # file://06-fix-urllib-exception.patch;patch=1 \ | ||
22 | # file://16-bug1179-imageop.patch;patch=1 \ | ||
23 | # file://13-set-wakeup-fix.patch;patch=1 \ | ||
24 | \ | ||
25 | file://sitecustomize.py \ | ||
26 | " | ||
27 | S = "${WORKDIR}/Python-${PV}" | ||
28 | |||
29 | inherit autotools | ||
30 | |||
31 | # The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources | ||
32 | #Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :( | ||
33 | TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__" | ||
34 | TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" | ||
35 | |||
36 | do_configure_prepend() { | ||
37 | autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || oenote "_ctypes failed to autoreconf" | ||
38 | } | ||
39 | |||
40 | # | ||
41 | # Copy config.h and an appropriate Makefile for distutils.sysconfig, | ||
42 | # which laters uses the information out of these to compile extensions | ||
43 | # | ||
44 | do_compile_prepend() { | ||
45 | install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/ | ||
46 | install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ | ||
47 | install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/ | ||
48 | install -m 0644 Makefile Makefile.orig | ||
49 | install -m 0644 Makefile Makefile.backup | ||
50 | sed -e 's,${includedir},${STAGING_INCDIR},' < Makefile.backup > Makefile | ||
51 | install -m 0644 Makefile Makefile.backup | ||
52 | sed -e 's,${libdir},${STAGING_LIBDIR},' < Makefile.backup > Makefile | ||
53 | install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ | ||
54 | } | ||
55 | |||
56 | do_compile() { | ||
57 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | ||
58 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | ||
59 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
60 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
61 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
62 | OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so | ||
63 | |||
64 | oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR} | ||
65 | |||
66 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | ||
67 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | ||
68 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
69 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
70 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
71 | OPT="${CFLAGS}" | ||
72 | } | ||
73 | |||
74 | do_install() { | ||
75 | install -m 0644 Makefile.orig Makefile | ||
76 | |||
77 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ | ||
78 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ | ||
79 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
80 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
81 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
82 | DESTDIR=${D} LIBDIR=${libdir} install | ||
83 | |||
84 | install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} | ||
85 | |||
86 | # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144 | ||
87 | sed -i -e s,ccache,'$(CCACHE)', ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile | ||
88 | } | ||
89 | |||
90 | require python-${PYTHON_MAJMIN}-manifest.inc | ||
91 | |||
92 | # manual dependency additions | ||
93 | RPROVIDES_python-core = "python" | ||
94 | RRECOMMENDS_python-core = "python-readline" | ||
95 | RRECOMMENDS_python-crypt = "openssl" | ||
96 | |||
97 | # add sitecustomize | ||
98 | FILES_python-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py" | ||
99 | # ship 2to3 | ||
100 | FILES_python-core += "${bindir}/2to3" | ||
101 | |||
102 | # package libpython2 | ||
103 | PACKAGES =+ "libpython2" | ||
104 | FILES_libpython2 = "${libdir}/libpython*.so*" | ||
105 | |||
106 | # additional stuff -dev | ||
107 | |||
108 | FILES_${PN}-dev = "\ | ||
109 | ${includedir} \ | ||
110 | ${libdir}/lib*${SOLIBSDEV} \ | ||
111 | ${libdir}/*.la \ | ||
112 | ${libdir}/*.a \ | ||
113 | ${libdir}/*.o \ | ||
114 | ${libdir}/pkgconfig \ | ||
115 | ${base_libdir}/*.a \ | ||
116 | ${base_libdir}/*.o \ | ||
117 | ${datadir}/aclocal \ | ||
118 | ${datadir}/pkgconfig \ | ||
119 | " | ||
120 | |||
121 | # catch debug extensions (isn't that already in python-core-dbg?) | ||
122 | FILES_python-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug" | ||
123 | |||
124 | # catch all the rest (unsorted) | ||
125 | PACKAGES += "python-misc" | ||
126 | FILES_python-misc = "${libdir}/python${PYTHON_MAJMIN}" | ||
127 | |||
128 | # catch manpage | ||
129 | PACKAGES += "python-man" | ||
130 | FILES_python-man = "${datadir}/man" | ||