summaryrefslogtreecommitdiffstats
path: root/meta/packages/python
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-12-03 12:08:52 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-12-03 12:08:52 +0000
commitba1c4fa94426f8e46bf0e9ab1d225039bdb78158 (patch)
tree1a279f092f44d36c8218ee2430005b6a772a83d3 /meta/packages/python
parent3b5336f7cf1c01c23e2fd81b54fbf89558fc2cd4 (diff)
downloadpoky-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')
-rw-r--r--meta/packages/python/python-2.6-manifest.inc268
-rw-r--r--meta/packages/python/python-2.6.1/00-fix-bindir-libdir-for-cross.patch20
-rw-r--r--meta/packages/python/python-2.6.1/01-use-proper-tools-for-cross-build.patch116
-rw-r--r--meta/packages/python/python-2.6.1/02-remove-test-for-cross.patch94
-rw-r--r--meta/packages/python/python-2.6.1/03-fix-tkinter-detection.patch40
-rw-r--r--meta/packages/python/python-2.6.1/04-default-is-optimized.patch52
-rw-r--r--meta/packages/python/python-2.6.1/05-enable-ctypes-cross-build.patch28
-rw-r--r--meta/packages/python/python-2.6.1/07-export-grammer.patch10
-rw-r--r--meta/packages/python/python-2.6.1/99-ignore-optimization-flag.patch19
-rw-r--r--meta/packages/python/python-2.6.1/sitecustomize.py45
-rw-r--r--meta/packages/python/python-2.6.2/00-fix-bindir-libdir-for-cross.patch20
-rw-r--r--meta/packages/python/python-2.6.2/01-use-proper-tools-for-cross-build.patch116
-rw-r--r--meta/packages/python/python-2.6.2/02-remove-test-for-cross.patch94
-rw-r--r--meta/packages/python/python-2.6.2/03-fix-tkinter-detection.patch40
-rw-r--r--meta/packages/python/python-2.6.2/04-default-is-optimized.patch52
-rw-r--r--meta/packages/python/python-2.6.2/05-enable-ctypes-cross-build.patch28
-rw-r--r--meta/packages/python/python-2.6.2/99-ignore-optimization-flag.patch19
-rw-r--r--meta/packages/python/python-2.6.2/sitecustomize.py45
-rw-r--r--meta/packages/python/python-native-2.6.1/00-fix-bindir-libdir-for-cross.patch20
-rw-r--r--meta/packages/python/python-native-2.6.1/04-default-is-optimized.patch18
-rw-r--r--meta/packages/python/python-native-2.6.1/10-distutils-fix-swig-parameter.patch16
-rw-r--r--meta/packages/python/python-native-2.6.1/11-distutils-never-modify-shebang-line.patch18
-rw-r--r--meta/packages/python/python-native-2.6.1/12-distutils-prefix-is-inside-staging-area.patch60
-rw-r--r--meta/packages/python/python-native-2.6.1/debug.patch27
-rw-r--r--meta/packages/python/python-native-2.6.1/nohostlibs.patch53
-rw-r--r--meta/packages/python/python-native-2.6.1/sitecustomize.py45
-rw-r--r--meta/packages/python/python-native_2.6.1.bb33
-rw-r--r--meta/packages/python/python.inc23
-rw-r--r--meta/packages/python/python_2.6.1.bb113
-rw-r--r--meta/packages/python/python_2.6.2.bb130
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
8PROVIDES+="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
10PACKAGES="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
12DESCRIPTION_python-profile="Python Basic Profiling Support"
13RDEPENDS_python-profile="python-core python-textutils"
14FILES_python-profile="${libdir}/python2.6/profile.* ${libdir}/python2.6/pstats.* ${libdir}/python2.6/cProfile.* ${libdir}/python2.6/lib-dynload/_lsprof.so "
15
16DESCRIPTION_python-threading="Python Threading & Synchronization Support"
17RDEPENDS_python-threading="python-core python-lang"
18FILES_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
20DESCRIPTION_python-distutils="Python Distribution Utilities"
21RDEPENDS_python-distutils="python-core"
22FILES_python-distutils="${libdir}/python2.6/config ${libdir}/python2.6/distutils "
23
24DESCRIPTION_python-doctest="Python framework for running examples in docstrings."
25RDEPENDS_python-doctest="python-core python-lang python-io python-re python-unittest python-debugger python-difflib"
26FILES_python-doctest="${libdir}/python2.6/doctest.* "
27
28DESCRIPTION_python-stringold="Python String APIs [deprecated]"
29RDEPENDS_python-stringold="python-core python-re"
30FILES_python-stringold="${libdir}/python2.6/lib-dynload/strop.so ${libdir}/python2.6/string.* "
31
32DESCRIPTION_python-codecs="Python Codecs, Encodings & i18n Support"
33RDEPENDS_python-codecs="python-core python-lang"
34FILES_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
36DESCRIPTION_python-ctypes="Python C Types Support"
37RDEPENDS_python-ctypes="python-core"
38FILES_python-ctypes="${libdir}/python2.6/ctypes ${libdir}/python2.6/lib-dynload/_ctypes.so "
39
40DESCRIPTION_python-pickle="Python Persistence Support"
41RDEPENDS_python-pickle="python-core python-codecs python-io python-re"
42FILES_python-pickle="${libdir}/python2.6/pickle.* ${libdir}/python2.6/shelve.* ${libdir}/python2.6/lib-dynload/cPickle.so "
43
44DESCRIPTION_python-datetime="Python Calendar and Time support"
45RDEPENDS_python-datetime="python-core python-codecs"
46FILES_python-datetime="${libdir}/python2.6/_strptime.* ${libdir}/python2.6/calendar.* ${libdir}/python2.6/lib-dynload/datetime.so "
47
48DESCRIPTION_python-core="Python Interpreter and core modules (needed!)"
49RDEPENDS_python-core=""
50FILES_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
52DESCRIPTION_python-io="Python Low-Level I/O"
53RDEPENDS_python-io="python-core python-math"
54FILES_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
56DESCRIPTION_python-compiler="Python Compiler Support"
57RDEPENDS_python-compiler="python-core"
58FILES_python-compiler="${libdir}/python2.6/compiler "
59
60DESCRIPTION_python-compression="Python High Level Compression Support"
61RDEPENDS_python-compression="python-core python-zlib"
62FILES_python-compression="${libdir}/python2.6/gzip.* ${libdir}/python2.6/zipfile.* ${libdir}/python2.6/tarfile.* ${libdir}/python2.6/lib-dynload/bz2.so "
63
64DESCRIPTION_python-re="Python Regular Expression APIs"
65RDEPENDS_python-re="python-core"
66FILES_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
68DESCRIPTION_python-xmlrpc="Python XMLRPC Support"
69RDEPENDS_python-xmlrpc="python-core python-xml python-netserver python-lang"
70FILES_python-xmlrpc="${libdir}/python2.6/xmlrpclib.* ${libdir}/python2.6/SimpleXMLRPCServer.* "
71
72DESCRIPTION_python-terminal="Python Terminal Controlling Support"
73RDEPENDS_python-terminal="python-core python-io"
74FILES_python-terminal="${libdir}/python2.6/pty.* ${libdir}/python2.6/tty.* "
75
76DESCRIPTION_python-email="Python Email Support"
77RDEPENDS_python-email="python-core python-io python-re python-mime python-audio python-image python-netclient"
78FILES_python-email="${libdir}/python2.6/imaplib.* ${libdir}/python2.6/email "
79
80DESCRIPTION_python-image="Python Graphical Image Handling"
81RDEPENDS_python-image="python-core"
82FILES_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
84DESCRIPTION_python-tests="Python Tests"
85RDEPENDS_python-tests="python-core"
86FILES_python-tests="${libdir}/python2.6/test "
87
88DESCRIPTION_python-core-dbg="Python core module debug information"
89RDEPENDS_python-core-dbg="python-core"
90FILES_python-core-dbg="${libdir}/python2.6/config/.debug ${libdir}/python2.6/lib-dynload/.debug ${bindir}/.debug ${libdir}/.debug "
91
92DESCRIPTION_python-resource="Python Resource Control Interface"
93RDEPENDS_python-resource="python-core"
94FILES_python-resource="${libdir}/python2.6/lib-dynload/resource.so "
95
96DESCRIPTION_python-json="Python JSON Support"
97RDEPENDS_python-json="python-core python-math python-re"
98FILES_python-json="${libdir}/python2.6/json "
99
100DESCRIPTION_python-devel="Python Development Package"
101RDEPENDS_python-devel="python-core"
102FILES_python-devel="${includedir} ${libdir}/libpython2.6.so ${libdir}/python2.6/config "
103
104DESCRIPTION_python-difflib="Python helpers for computing deltas between objects."
105RDEPENDS_python-difflib="python-lang python-re"
106FILES_python-difflib="${libdir}/python2.6/difflib.* "
107
108DESCRIPTION_python-math="Python Math Support"
109RDEPENDS_python-math="python-core"
110FILES_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
112DESCRIPTION_python-syslog="Python Syslog Interface"
113RDEPENDS_python-syslog="python-core"
114FILES_python-syslog="${libdir}/python2.6/lib-dynload/syslog.so "
115
116DESCRIPTION_python-hotshot="Python Hotshot Profiler"
117RDEPENDS_python-hotshot="python-core"
118FILES_python-hotshot="${libdir}/python2.6/hotshot ${libdir}/python2.6/lib-dynload/_hotshot.so "
119
120DESCRIPTION_python-unixadmin="Python Unix Administration Support"
121RDEPENDS_python-unixadmin="python-core"
122FILES_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
124DESCRIPTION_python-textutils="Python Option Parsing, Text Wrapping and Comma-Separated-Value Support"
125RDEPENDS_python-textutils="python-core python-io python-re python-stringold"
126FILES_python-textutils="${libdir}/python2.6/lib-dynload/_csv.so ${libdir}/python2.6/csv.* ${libdir}/python2.6/optparse.* ${libdir}/python2.6/textwrap.* "
127
128DESCRIPTION_python-tkinter="Python Tcl/Tk Bindings"
129RDEPENDS_python-tkinter="python-core"
130FILES_python-tkinter="${libdir}/python2.6/lib-dynload/_tkinter.so ${libdir}/python2.6/lib-tk "
131
132DESCRIPTION_python-gdbm="Python GNU Database Support"
133RDEPENDS_python-gdbm="python-core"
134FILES_python-gdbm="${libdir}/python2.6/lib-dynload/gdbm.so "
135
136DESCRIPTION_python-elementtree="Python elementree"
137RDEPENDS_python-elementtree="python-core"
138FILES_python-elementtree="${libdir}/python2.6/lib-dynload/_elementtree.so "
139
140DESCRIPTION_python-fcntl="Python's fcntl Interface"
141RDEPENDS_python-fcntl="python-core"
142FILES_python-fcntl="${libdir}/python2.6/lib-dynload/fcntl.so "
143
144DESCRIPTION_python-netclient="Python Internet Protocol Clients"
145RDEPENDS_python-netclient="python-core python-crypt python-datetime python-io python-lang python-logging python-mime"
146FILES_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
148DESCRIPTION_python-pprint="Python Pretty-Print Support"
149RDEPENDS_python-pprint="python-core"
150FILES_python-pprint="${libdir}/python2.6/pprint.* "
151
152DESCRIPTION_python-netserver="Python Internet Protocol Servers"
153RDEPENDS_python-netserver="python-core python-netclient"
154FILES_python-netserver="${libdir}/python2.6/cgi.* ${libdir}/python2.6/*HTTPServer.* ${libdir}/python2.6/SocketServer.* "
155
156DESCRIPTION_python-curses="Python Curses Support"
157RDEPENDS_python-curses="python-core"
158FILES_python-curses="${libdir}/python2.6/curses ${libdir}/python2.6/lib-dynload/_curses.so ${libdir}/python2.6/lib-dynload/_curses_panel.so "
159
160DESCRIPTION_python-smtpd="Python Simple Mail Transport Daemon"
161RDEPENDS_python-smtpd="python-core python-netserver python-email python-mime"
162FILES_python-smtpd="${bindir}/smtpd.* "
163
164DESCRIPTION_python-html="Python HTML Processing"
165RDEPENDS_python-html="python-core"
166FILES_python-html="${libdir}/python2.6/formatter.* ${libdir}/python2.6/htmlentitydefs.* ${libdir}/python2.6/htmllib.* ${libdir}/python2.6/markupbase.* ${libdir}/python2.6/sgmllib.* "
167
168DESCRIPTION_python-readline="Python Readline Support"
169RDEPENDS_python-readline="python-core"
170FILES_python-readline="${libdir}/python2.6/lib-dynload/readline.so ${libdir}/python2.6/rlcompleter.* "
171
172DESCRIPTION_python-subprocess="Python Subprocess Support"
173RDEPENDS_python-subprocess="python-core python-io python-re python-fcntl python-pickle"
174FILES_python-subprocess="${libdir}/python2.6/subprocess.* "
175
176DESCRIPTION_python-pydoc="Python Interactive Help Support"
177RDEPENDS_python-pydoc="python-core python-lang python-stringold python-re"
178FILES_python-pydoc="${bindir}/pydoc ${libdir}/python2.6/pydoc.* "
179
180DESCRIPTION_python-logging="Python Logging Support"
181RDEPENDS_python-logging="python-core python-io python-lang python-pickle python-stringold"
182FILES_python-logging="${libdir}/python2.6/logging "
183
184DESCRIPTION_python-mailbox="Python Mailbox Format Support"
185RDEPENDS_python-mailbox="python-core python-mime"
186FILES_python-mailbox="${libdir}/python2.6/mailbox.* "
187
188DESCRIPTION_python-xml="Python basic XML support."
189RDEPENDS_python-xml="python-core python-re"
190FILES_python-xml="${libdir}/python2.6/lib-dynload/pyexpat.so ${libdir}/python2.6/xml ${libdir}/python2.6/xmllib.* "
191
192DESCRIPTION_python-mime="Python MIME Handling APIs"
193RDEPENDS_python-mime="python-core python-io"
194FILES_python-mime="${libdir}/python2.6/mimetools.* ${libdir}/python2.6/uu.* ${libdir}/python2.6/quopri.* ${libdir}/python2.6/rfc822.* "
195
196DESCRIPTION_python-sqlite3="Python Sqlite3 Database Support"
197RDEPENDS_python-sqlite3="python-core python-datetime python-lang python-crypt python-io python-threading python-zlib"
198FILES_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
200DESCRIPTION_python-sqlite3-tests="Python Sqlite3 Database Support Tests"
201RDEPENDS_python-sqlite3-tests="python-core python-sqlite3"
202FILES_python-sqlite3-tests="${libdir}/python2.6/sqlite3/test "
203
204DESCRIPTION_python-unittest="Python Unit Testing Framework"
205RDEPENDS_python-unittest="python-core python-stringold python-lang"
206FILES_python-unittest="${libdir}/python2.6/unittest.* "
207
208DESCRIPTION_python-multiprocessing="Python Multiprocessing Support"
209RDEPENDS_python-multiprocessing="python-core python-io python-lang"
210FILES_python-multiprocessing="${libdir}/python2.6/lib-dynload/_multiprocessing.so ${libdir}/python2.6/multiprocessing "
211
212DESCRIPTION_python-robotparser="Python robots.txt parser"
213RDEPENDS_python-robotparser="python-core python-netclient"
214FILES_python-robotparser="${libdir}/python2.6/robotparser.* "
215
216DESCRIPTION_python-compile="Python Bytecode Compilation Support"
217RDEPENDS_python-compile="python-core"
218FILES_python-compile="${libdir}/python2.6/py_compile.* ${libdir}/python2.6/compileall.* "
219
220DESCRIPTION_python-debugger="Python Debugger"
221RDEPENDS_python-debugger="python-core python-io python-lang python-re python-stringold python-shell python-pprint"
222FILES_python-debugger="${libdir}/python2.6/bdb.* ${libdir}/python2.6/pdb.* "
223
224DESCRIPTION_python-pkgutil="Python Package Extension Utility Support"
225RDEPENDS_python-pkgutil="python-core"
226FILES_python-pkgutil="${libdir}/python2.6/pkgutil.* "
227
228DESCRIPTION_python-shell="Python Shell-Like Functionality"
229RDEPENDS_python-shell="python-core python-re"
230FILES_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
232DESCRIPTION_python-bsddb="Python Berkeley Database Bindings"
233RDEPENDS_python-bsddb="python-core"
234FILES_python-bsddb="${libdir}/python2.6/bsddb ${libdir}/python2.6/lib-dynload/_bsddb.so "
235
236DESCRIPTION_python-mmap="Python Memory-Mapped-File Support"
237RDEPENDS_python-mmap="python-core python-io"
238FILES_python-mmap="${libdir}/python2.6/lib-dynload/mmap.so "
239
240DESCRIPTION_python-zlib="Python zlib Support."
241RDEPENDS_python-zlib="python-core"
242FILES_python-zlib="${libdir}/python2.6/lib-dynload/zlib.so "
243
244DESCRIPTION_python-db="Python File-Based Database Support"
245RDEPENDS_python-db="python-core"
246FILES_python-db="${libdir}/python2.6/anydbm.* ${libdir}/python2.6/dumbdbm.* ${libdir}/python2.6/whichdb.* "
247
248DESCRIPTION_python-crypt="Python Basic Cryptographic and Hashing Support"
249RDEPENDS_python-crypt="python-core"
250FILES_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
252DESCRIPTION_python-idle="Python Integrated Development Environment"
253RDEPENDS_python-idle="python-core python-tkinter"
254FILES_python-idle="${bindir}/idle ${libdir}/python2.6/idlelib "
255
256DESCRIPTION_python-lang="Python Low-Level Language Support"
257RDEPENDS_python-lang="python-core"
258FILES_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
260DESCRIPTION_python-audio="Python Audio Handling"
261RDEPENDS_python-audio="python-core"
262FILES_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
264DESCRIPTION_python-modules="All Python modules"
265RDEPENDS_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 "
266ALLOW_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
6Index: 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
5Index: 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) \
84Index: 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>
6Index: 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
5Index: 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
6Index: 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
19Index: 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
4Index: 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
6Index: 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
10import os
11
12def __exithandler():
13 try:
14 readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
15 except IOError:
16 pass
17
18def __registerExitHandler():
19 import atexit
20 atexit.register( __exithandler )
21
22def __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
30def __enableDefaultEncoding():
31 import sys
32 try:
33 sys.setdefaultencoding( "utf8" )
34 except LookupError:
35 pass
36
37import sys
38try:
39 import rlcompleter, readline
40except ImportError:
41 pass
42else:
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
6Index: 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
5Index: 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) \
84Index: 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>
6Index: 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
5Index: 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
6Index: 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
19Index: 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
4Index: 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
6Index: 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
10import os
11
12def __exithandler():
13 try:
14 readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
15 except IOError:
16 pass
17
18def __registerExitHandler():
19 import atexit
20 atexit.register( __exithandler )
21
22def __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
30def __enableDefaultEncoding():
31 import sys
32 try:
33 sys.setdefaultencoding( "utf8" )
34 except LookupError:
35 pass
36
37import sys
38try:
39 import rlcompleter, readline
40except ImportError:
41 pass
42else:
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
6Index: 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
6Index: 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>
4Index: 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
6Index: 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
4Index: 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 @@
1Index: 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 @@
1Index: 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
10import os
11
12def __exithandler():
13 try:
14 readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
15 except IOError:
16 pass
17
18def __registerExitHandler():
19 import atexit
20 atexit.register( __exithandler )
21
22def __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
30def __enableDefaultEncoding():
31 import sys
32 try:
33 sys.setdefaultencoding( "utf8" )
34 except LookupError:
35 pass
36
37import sys
38try:
39 import rlcompleter, readline
40except ImportError:
41 pass
42else:
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 @@
1require python.inc
2DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native"
3PR = "${INC_PR}.2"
4
5SRC_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"
16S = "${WORKDIR}/Python-${PV}"
17
18inherit native
19
20EXTRA_OEMAKE = '\
21 BUILD_SYS="" \
22 HOST_SYS="" \
23 LIBC="" \
24 STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
25 STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
26'
27
28NATIVE_INSTALL_WORKS = "1"
29do_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 @@
1DESCRIPTION = "The Python Programming Language"
2HOMEPAGE = "http://www.python.org"
3LICENSE = "PSF"
4SECTION = "devel/python"
5PRIORITY = "optional"
6# bump this on every change in contrib/python/generate-manifest-2.6.py
7INC_PR = "ml8"
8
9DEFAULT_PREFERENCE = "-26"
10
11PYTHON_MAJMIN = "2.6"
12
13inherit autotools
14
15EXTRA_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 @@
1require python.inc
2DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib"
3DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
4PR = "${INC_PR}.0"
5
6SRC_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"
28S = "${WORKDIR}/Python-${PV}"
29
30inherit 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 :(
34TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
35TARGET_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#
41do_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
53do_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
71do_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
87require python-${PYTHON_MAJMIN}-manifest.inc
88
89# manual dependency additions
90RPROVIDES_python-core = "python"
91RRECOMMENDS_python-core = "python-readline"
92RRECOMMENDS_python-crypt = "openssl"
93
94# add sitecustomize
95FILES_python-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py"
96
97# 2to3
98FILES_python-core += "${bindir}/2to3"
99
100# package libpython
101PACKAGES =+ "libpython2"
102FILES_libpython2 = "${libdir}/libpython*.so.*"
103
104# catch debug extensions (isn't that already in python-core-dbg?)
105FILES_python-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
106
107# catch all the rest (unsorted)
108PACKAGES += "python-misc"
109FILES_python-misc = "${libdir}/python${PYTHON_MAJMIN}"
110
111# catch manpage
112PACKAGES += "python-man"
113FILES_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 @@
1require python.inc
2DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib"
3DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
4# set to .0 on every increase of INC_PR
5PR = "${INC_PR}.0"
6
7SRC_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"
27S = "${WORKDIR}/Python-${PV}"
28
29inherit 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 :(
33TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
34TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
35
36do_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#
44do_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
56do_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
74do_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
90require python-${PYTHON_MAJMIN}-manifest.inc
91
92# manual dependency additions
93RPROVIDES_python-core = "python"
94RRECOMMENDS_python-core = "python-readline"
95RRECOMMENDS_python-crypt = "openssl"
96
97# add sitecustomize
98FILES_python-core += "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py"
99# ship 2to3
100FILES_python-core += "${bindir}/2to3"
101
102# package libpython2
103PACKAGES =+ "libpython2"
104FILES_libpython2 = "${libdir}/libpython*.so*"
105
106# additional stuff -dev
107
108FILES_${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?)
122FILES_python-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
123
124# catch all the rest (unsorted)
125PACKAGES += "python-misc"
126FILES_python-misc = "${libdir}/python${PYTHON_MAJMIN}"
127
128# catch manpage
129PACKAGES += "python-man"
130FILES_python-man = "${datadir}/man"