summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2017-06-20 14:11:44 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-20 22:31:56 +0000
commit8d94b9db221d1def42f091b991903faa2d1651ce (patch)
tree9d32da2801fe835cc451c9b69040e01691b87906 /meta/recipes-devtools
parente153efde9754a650e555f46cba09680baabd7d7e (diff)
downloadpoky-8d94b9db221d1def42f091b991903faa2d1651ce.tar.gz
python: Restructure python packaging and replace it with autopackaging
The reason we have a manifest file for python is that our goal is to keep python-core as small as posible and add other python packages only when the user needs them, hence why we split upstream python into several packages. Although our manifest file has several issues: - Its unorganized and hard to read and understand it for an average human being. - When a new package needs to be added, the user actually has to modify the script that creates the manifest, then call the script to create a new manifest, and then submit a patch for both the script and the manifest, so its a little convoluted. - Git complains every single time a patch is submitted to the manifest, since it violates some of its guidelines. - It changes or may change with every release of python, its impossible to know if the required files for a certain package have changed (it could have more or less dependencies), the only way of doing so would be to install and test them all one by one on separate individual images, and even then we wouldnt know if they require less dependencies, we would just know if an extra dependency is required since it would complain, lets face it, this isnt feasible. - The same thing happens for new packages, if someone wants to add a new package, its dependencies need to be checked manually one by one. This patch fixes those issues, while adding some additional features. Features/Fixes: - A new manifest format is used (JSON), easy to read and understand. This file is parsed by the python recipe and python packages read from here are passed directly to bitbake during parsing time. - It provides an automatic manifest creation task (explained below), which automagically checks for every package dependencies and adds them to the new manifest, hence we will have on each package exactly what that package needs to be run, providing finer granularity. - Dependencies are also checked automagically for new packages (explained below). - Fixes the manifest in the following ways: * python-core should be base and all packages should depend on it, fixes lang, string, codecs, etc. * Fixes packages with repeated files (e.g. bssdb and db, or netclient and mime, and many others). - Sitecustomize was fixed since encoding was deprecated. - The JSON manifest file invalidates bitbake's cache, so if it changes the python package will be rebuilt. - It creates a solution for users that want precompiled bytecode files (*.pyc) INCLUDE_PYCS = "1" can be set by the user on their local.conf to include such files, some argument they get faster boot time, even when the files would be created on their first run?, but they also sometimes give a magic number error and take up space, so we leave it to the user to decide if they want them or not. - Fixes python-core dependencies, e.g. When python is run on an image, it TRIES to import everything it needs, but it doesnt necessarily fails when it doesnt find something, so even if we didnt know, we had errors like (trimmed on purpose): # trying /usr/lib/python2.7/_locale.so # trying /usr/lib/python2.7/lib-dynload/_locale.so # trying /usr/lib/python2.7/_sysconfigdata.so while it didnt complain about _locale it should have imported it, after creating a new manifest with the automated script we get: # trying /usr/lib/python2.7/lib-dynload/_locale.so dlopen("/usr/lib/python2.7/lib-dynload/_locale.so", 2); import _locale # dynamically loaded from /usr/lib/python2.7/lib-dynload/_locale.so How to use (after a new release of python, or maybe before every OE release): - A new task called create_manifest was added to the python package, which may be invoked via: $ bitbake python -c create_manifest This task runs a script on native python on our HOST system, and since the python and python-native packages come from the same source, we can use it to know the dependencies of each module as if we were doing it on an image, this script is called create_manifest.py and in a very simplistic way it does the following: 1. Reads the JSON manifest file and creates a dictionary data structure with all of our python packages, their FILES, RDEPENDS and SUMMARY. 2. Loops through all of them and runs every module listed on them asynchronously, determining every dependency that they have. 3. These module dependencies are then handled, to be able to know which packages contain those files and which should RDEPEND on one another. 4. The data structure that comes out of this, is then used to create a new manifest file which is automatically copied onto the user's python directory replacing the old one. Create_manifest script features: - Handles modules which dont exist anymore (new release for example). - Handles modules that are builtin. - Deals with modules which were not compiled (e.g. bsddb or ossaudiodev) - Deals with packages which include folders. - Deals with packages which include FILES with a wildcard. - The manifest can be constructed on a multilib environment as well. - This method works for both python modules and shared libraries used by python. How to add a new package: - If a user wants to add a new package all that has to be done is modify the python2-manifest.json file, and add the required file(s) to the FILES list, the script should handle all the rest. Real example: We want to add a web browser package, including the file webbrowser.py which at the moment is on python-misc. "webbrowser": { "files": ["${libdir}/python2.7/lib-dynload/webbrowser.py"], "rdepends": [], "summary": "Python Web Browser support"} Run bitbake python -c create_manifest and the resulting manifest should be completed after a few seconds, showing something like: "webbrowser": { "files": ["${libdir}/python2.7/webbrowser.py"], "rdepends": ["core","fcntl","io","pickle","shell","subprocess"], "summary": "Python Web Browser support"} Known errors/issues: - Some special packages are handled differently: core, misc, modules,dev, staticdev. All these should be handled manually, because they either include binaries, static libraries, include files, etc. (something that we cant import). Specifically static libraries are not not supported by this method and have to be handled by the user. - The change should be transparent to the user, other than the fact that now we CANT build python-foo (it was pretty dumb anyway, since what building python-foo actually did was building the whole python package anyway), but doing IMAGE_INSTALL_append = " python-foo" would create an image with the requested package with no issues. [YOCTO #11510] [YOCTO #11694] [YOCTO #11695] (From OE-Core rev: 6959e2e4dba5bbfa6ffd49c44e738cc1c38bc280) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python-2.7-manifest.inc840
-rw-r--r--meta/recipes-devtools/python/python-native-2.7-manifest.inc9
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.13.bb24
-rw-r--r--meta/recipes-devtools/python/python/create_manifest2.py277
-rw-r--r--meta/recipes-devtools/python/python/get_module_deps2.py112
-rw-r--r--meta/recipes-devtools/python/python/python2-manifest.json1032
-rw-r--r--meta/recipes-devtools/python/python/sitecustomize.py8
-rw-r--r--meta/recipes-devtools/python/python_2.7.13.bb88
8 files changed, 1528 insertions, 862 deletions
diff --git a/meta/recipes-devtools/python/python-2.7-manifest.inc b/meta/recipes-devtools/python/python-2.7-manifest.inc
deleted file mode 100644
index 7c3fc1b73a..0000000000
--- a/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ /dev/null
@@ -1,840 +0,0 @@
1
2# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
3# Generator: './scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
4
5
6
7PROVIDES+=" \
8 ${PN}-2to3 \
9 ${PN}-argparse \
10 ${PN}-audio \
11 ${PN}-bsddb \
12 ${PN}-codecs \
13 ${PN}-compile \
14 ${PN}-compiler \
15 ${PN}-compression \
16 ${PN}-contextlib \
17 ${PN}-core \
18 ${PN}-crypt \
19 ${PN}-ctypes \
20 ${PN}-curses \
21 ${PN}-datetime \
22 ${PN}-db \
23 ${PN}-debugger \
24 ${PN}-dev \
25 ${PN}-difflib \
26 ${PN}-distutils \
27 ${PN}-distutils-staticdev \
28 ${PN}-doctest \
29 ${PN}-email \
30 ${PN}-fcntl \
31 ${PN}-gdbm \
32 ${PN}-hotshot \
33 ${PN}-html \
34 ${PN}-idle \
35 ${PN}-image \
36 ${PN}-importlib \
37 ${PN}-io \
38 ${PN}-json \
39 ${PN}-lang \
40 ${PN}-logging \
41 ${PN}-mailbox \
42 ${PN}-math \
43 ${PN}-mime \
44 ${PN}-mmap \
45 ${PN}-multiprocessing \
46 ${PN}-netclient \
47 ${PN}-netserver \
48 ${PN}-numbers \
49 ${PN}-pickle \
50 ${PN}-pkgutil \
51 ${PN}-plistlib \
52 ${PN}-pprint \
53 ${PN}-profile \
54 ${PN}-pydoc \
55 ${PN}-re \
56 ${PN}-readline \
57 ${PN}-resource \
58 ${PN}-robotparser \
59 ${PN}-runpy \
60 ${PN}-shell \
61 ${PN}-smtpd \
62 ${PN}-sqlite3 \
63 ${PN}-sqlite3-tests \
64 ${PN}-stringold \
65 ${PN}-subprocess \
66 ${PN}-syslog \
67 ${PN}-terminal \
68 ${PN}-tests \
69 ${PN}-textutils \
70 ${PN}-threading \
71 ${PN}-tkinter \
72 ${PN}-unittest \
73 ${PN}-unixadmin \
74 ${PN}-xml \
75 ${PN}-xmlrpc \
76 ${PN}-zlib \
77"
78
79PACKAGES=" \
80 ${PN}-dbg \
81 ${PN}-2to3 \
82 ${PN}-argparse \
83 ${PN}-audio \
84 ${PN}-bsddb \
85 ${PN}-codecs \
86 ${PN}-compile \
87 ${PN}-compiler \
88 ${PN}-compression \
89 ${PN}-contextlib \
90 ${PN}-core \
91 ${PN}-crypt \
92 ${PN}-ctypes \
93 ${PN}-curses \
94 ${PN}-datetime \
95 ${PN}-db \
96 ${PN}-debugger \
97 ${PN}-dev \
98 ${PN}-difflib \
99 ${PN}-distutils-staticdev ${PN}-distutils \
100 ${PN}-doctest \
101 ${PN}-email \
102 ${PN}-fcntl \
103 ${PN}-gdbm \
104 ${PN}-hotshot \
105 ${PN}-html \
106 ${PN}-idle \
107 ${PN}-image \
108 ${PN}-importlib \
109 ${PN}-io \
110 ${PN}-json \
111 ${PN}-lang \
112 ${PN}-logging \
113 ${PN}-mailbox \
114 ${PN}-math \
115 ${PN}-mime \
116 ${PN}-mmap \
117 ${PN}-multiprocessing \
118 ${PN}-netclient \
119 ${PN}-netserver \
120 ${PN}-numbers \
121 ${PN}-pickle \
122 ${PN}-pkgutil \
123 ${PN}-plistlib \
124 ${PN}-pprint \
125 ${PN}-profile \
126 ${PN}-pydoc \
127 ${PN}-re \
128 ${PN}-readline \
129 ${PN}-resource \
130 ${PN}-robotparser \
131 ${PN}-runpy \
132 ${PN}-shell \
133 ${PN}-smtpd \
134 ${PN}-sqlite3 \
135 ${PN}-sqlite3-tests \
136 ${PN}-stringold \
137 ${PN}-subprocess \
138 ${PN}-syslog \
139 ${PN}-terminal \
140 ${PN}-tests \
141 ${PN}-textutils \
142 ${PN}-threading \
143 ${PN}-tkinter \
144 ${PN}-unittest \
145 ${PN}-unixadmin \
146 ${PN}-xml \
147 ${PN}-xmlrpc \
148 ${PN}-zlib \
149 ${PN}-modules\
150"
151
152SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
153RDEPENDS_${PN}-2to3="${PN}-core"
154FILES_${PN}-2to3=" \
155 ${bindir}/2to3 \
156 ${libdir}/python2.7/lib2to3 \
157"
158
159SUMMARY_${PN}-argparse="Python command line argument parser"
160RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
161FILES_${PN}-argparse=" \
162 ${libdir}/python2.7/argparse.* \
163"
164
165SUMMARY_${PN}-audio="Python Audio Handling"
166RDEPENDS_${PN}-audio="${PN}-core"
167FILES_${PN}-audio=" \
168 ${libdir}/python2.7/wave.* \
169 ${libdir}/python2.7/chunk.* \
170 ${libdir}/python2.7/sndhdr.* \
171 ${libdir}/python2.7/lib-dynload/ossaudiodev.so \
172 ${libdir}/python2.7/lib-dynload/audioop.so \
173 ${libdir}/python2.7/audiodev.* \
174 ${libdir}/python2.7/sunaudio.* \
175 ${libdir}/python2.7/sunau.* \
176 ${libdir}/python2.7/toaiff.* \
177"
178
179SUMMARY_${PN}-bsddb="Python bindings for the Berkeley Database"
180RDEPENDS_${PN}-bsddb="${PN}-core"
181FILES_${PN}-bsddb=" \
182 ${libdir}/python2.7/bsddb \
183 ${libdir}/python2.7/lib-dynload/_bsddb.so \
184"
185
186SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
187RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
188FILES_${PN}-codecs=" \
189 ${libdir}/python2.7/codecs.* \
190 ${libdir}/python2.7/encodings \
191 ${libdir}/python2.7/gettext.* \
192 ${libdir}/python2.7/locale.* \
193 ${libdir}/python2.7/lib-dynload/_locale.so \
194 ${libdir}/python2.7/lib-dynload/_codecs* \
195 ${libdir}/python2.7/lib-dynload/_multibytecodec.so \
196 ${libdir}/python2.7/lib-dynload/unicodedata.so \
197 ${libdir}/python2.7/stringprep.* \
198 ${libdir}/python2.7/xdrlib.* \
199"
200
201SUMMARY_${PN}-compile="Python bytecode compilation support"
202RDEPENDS_${PN}-compile="${PN}-core"
203FILES_${PN}-compile=" \
204 ${libdir}/python2.7/py_compile.* \
205 ${libdir}/python2.7/compileall.* \
206"
207
208SUMMARY_${PN}-compiler="Python compiler support"
209RDEPENDS_${PN}-compiler="${PN}-core"
210FILES_${PN}-compiler=" \
211 ${libdir}/python2.7/compiler \
212"
213
214SUMMARY_${PN}-compression="Python high-level compression support"
215RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib"
216FILES_${PN}-compression=" \
217 ${libdir}/python2.7/gzip.* \
218 ${libdir}/python2.7/zipfile.* \
219 ${libdir}/python2.7/tarfile.* \
220 ${libdir}/python2.7/lib-dynload/bz2.so \
221"
222
223SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts."
224RDEPENDS_${PN}-contextlib="${PN}-core"
225FILES_${PN}-contextlib=" \
226 ${libdir}/python${PYTHON_MAJMIN}/contextlib.* \
227"
228
229SUMMARY_${PN}-core="Python interpreter and core modules"
230RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
231FILES_${PN}-core=" \
232 ${libdir}/python2.7/__future__.* \
233 ${libdir}/python2.7/_abcoll.* \
234 ${libdir}/python2.7/abc.* \
235 ${libdir}/python2.7/ast.* \
236 ${libdir}/python2.7/copy.* \
237 ${libdir}/python2.7/copy_reg.* \
238 ${libdir}/python2.7/ConfigParser.* \
239 ${libdir}/python2.7/genericpath.* \
240 ${libdir}/python2.7/getopt.* \
241 ${libdir}/python2.7/linecache.* \
242 ${libdir}/python2.7/new.* \
243 ${libdir}/python2.7/os.* \
244 ${libdir}/python2.7/posixpath.* \
245 ${libdir}/python2.7/struct.* \
246 ${libdir}/python2.7/warnings.* \
247 ${libdir}/python2.7/site.* \
248 ${libdir}/python2.7/stat.* \
249 ${libdir}/python2.7/UserDict.* \
250 ${libdir}/python2.7/UserList.* \
251 ${libdir}/python2.7/UserString.* \
252 ${libdir}/python2.7/lib-dynload/binascii.so \
253 ${libdir}/python2.7/lib-dynload/_struct.so \
254 ${libdir}/python2.7/lib-dynload/time.so \
255 ${libdir}/python2.7/lib-dynload/xreadlines.so \
256 ${libdir}/python2.7/types.* \
257 ${libdir}/python2.7/platform.* \
258 ${bindir}/python* \
259 ${libdir}/python2.7/_weakrefset.* \
260 ${libdir}/python2.7/sysconfig.* \
261 ${libdir}/python2.7/_sysconfigdata.* \
262 ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h \
263 ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py \
264"
265
266SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
267RDEPENDS_${PN}-crypt="${PN}-core"
268FILES_${PN}-crypt=" \
269 ${libdir}/python2.7/hashlib.* \
270 ${libdir}/python2.7/md5.* \
271 ${libdir}/python2.7/sha.* \
272 ${libdir}/python2.7/lib-dynload/crypt.so \
273 ${libdir}/python2.7/lib-dynload/_hashlib.so \
274 ${libdir}/python2.7/lib-dynload/_sha256.so \
275 ${libdir}/python2.7/lib-dynload/_sha512.so \
276"
277
278SUMMARY_${PN}-ctypes="Python C types support"
279RDEPENDS_${PN}-ctypes="${PN}-core"
280FILES_${PN}-ctypes=" \
281 ${libdir}/python2.7/ctypes \
282 ${libdir}/python2.7/lib-dynload/_ctypes.so \
283 ${libdir}/python2.7/lib-dynload/_ctypes_test.so \
284"
285
286SUMMARY_${PN}-curses="Python curses support"
287RDEPENDS_${PN}-curses="${PN}-core"
288FILES_${PN}-curses=" \
289 ${libdir}/python2.7/curses \
290 ${libdir}/python2.7/lib-dynload/_curses.so \
291 ${libdir}/python2.7/lib-dynload/_curses_panel.so \
292"
293
294SUMMARY_${PN}-datetime="Python calendar and time support"
295RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
296FILES_${PN}-datetime=" \
297 ${libdir}/python2.7/_strptime.* \
298 ${libdir}/python2.7/calendar.* \
299 ${libdir}/python2.7/lib-dynload/datetime.so \
300"
301
302SUMMARY_${PN}-db="Python file-based database support"
303RDEPENDS_${PN}-db="${PN}-core"
304FILES_${PN}-db=" \
305 ${libdir}/python2.7/anydbm.* \
306 ${libdir}/python2.7/dumbdbm.* \
307 ${libdir}/python2.7/whichdb.* \
308"
309
310SUMMARY_${PN}-debugger="Python debugger"
311RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint"
312FILES_${PN}-debugger=" \
313 ${libdir}/python2.7/bdb.* \
314 ${libdir}/python2.7/pdb.* \
315"
316
317SUMMARY_${PN}-dev="Python development package"
318RDEPENDS_${PN}-dev="${PN}-core"
319FILES_${PN}-dev=" \
320 ${includedir} \
321 ${libdir}/lib*${SOLIBSDEV} \
322 ${libdir}/*.la \
323 ${libdir}/*.a \
324 ${libdir}/*.o \
325 ${libdir}/pkgconfig \
326 ${base_libdir}/*.a \
327 ${base_libdir}/*.o \
328 ${datadir}/aclocal \
329 ${datadir}/pkgconfig \
330 ${libdir}/python2.7/config/Makefile \
331"
332
333SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
334RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
335FILES_${PN}-difflib=" \
336 ${libdir}/python2.7/difflib.* \
337"
338
339SUMMARY_${PN}-distutils="Python Distribution Utilities"
340RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
341FILES_${PN}-distutils=" \
342 ${libdir}/python2.7/config \
343 ${libdir}/python2.7/distutils \
344"
345
346SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
347RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
348FILES_${PN}-distutils-staticdev=" \
349 ${libdir}/python2.7/config/lib*.a \
350"
351
352SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
353RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
354FILES_${PN}-doctest=" \
355 ${libdir}/python2.7/doctest.* \
356"
357
358SUMMARY_${PN}-email="Python email support"
359RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
360FILES_${PN}-email=" \
361 ${libdir}/python2.7/imaplib.* \
362 ${libdir}/python2.7/email \
363"
364
365SUMMARY_${PN}-fcntl="Python's fcntl interface"
366RDEPENDS_${PN}-fcntl="${PN}-core"
367FILES_${PN}-fcntl=" \
368 ${libdir}/python2.7/lib-dynload/fcntl.so \
369"
370
371SUMMARY_${PN}-gdbm="Python GNU database support"
372RDEPENDS_${PN}-gdbm="${PN}-core"
373FILES_${PN}-gdbm=" \
374 ${libdir}/python2.7/lib-dynload/gdbm.so \
375"
376
377SUMMARY_${PN}-hotshot="Python hotshot performance profiler"
378RDEPENDS_${PN}-hotshot="${PN}-core"
379FILES_${PN}-hotshot=" \
380 ${libdir}/python2.7/hotshot \
381 ${libdir}/python2.7/lib-dynload/_hotshot.so \
382"
383
384SUMMARY_${PN}-html="Python HTML processing support"
385RDEPENDS_${PN}-html="${PN}-core"
386FILES_${PN}-html=" \
387 ${libdir}/python2.7/formatter.* \
388 ${libdir}/python2.7/htmlentitydefs.* \
389 ${libdir}/python2.7/htmllib.* \
390 ${libdir}/python2.7/markupbase.* \
391 ${libdir}/python2.7/sgmllib.* \
392 ${libdir}/python2.7/HTMLParser.* \
393"
394
395SUMMARY_${PN}-idle="Python Integrated Development Environment"
396RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
397FILES_${PN}-idle=" \
398 ${bindir}/idle \
399 ${libdir}/python2.7/idlelib \
400"
401
402SUMMARY_${PN}-image="Python graphical image handling"
403RDEPENDS_${PN}-image="${PN}-core"
404FILES_${PN}-image=" \
405 ${libdir}/python2.7/colorsys.* \
406 ${libdir}/python2.7/imghdr.* \
407 ${libdir}/python2.7/lib-dynload/imageop.so \
408 ${libdir}/python2.7/lib-dynload/rgbimg.so \
409"
410
411SUMMARY_${PN}-importlib="Python import implementation library"
412RDEPENDS_${PN}-importlib="${PN}-core"
413FILES_${PN}-importlib=" \
414 ${libdir}/python2.7/importlib \
415"
416
417SUMMARY_${PN}-io="Python low-level I/O"
418RDEPENDS_${PN}-io="${PN}-core ${PN}-math ${PN}-textutils ${PN}-netclient ${PN}-contextlib"
419FILES_${PN}-io=" \
420 ${libdir}/python2.7/lib-dynload/_socket.so \
421 ${libdir}/python2.7/lib-dynload/_io.so \
422 ${libdir}/python2.7/lib-dynload/_ssl.so \
423 ${libdir}/python2.7/lib-dynload/select.so \
424 ${libdir}/python2.7/lib-dynload/termios.so \
425 ${libdir}/python2.7/lib-dynload/cStringIO.so \
426 ${libdir}/python2.7/pipes.* \
427 ${libdir}/python2.7/socket.* \
428 ${libdir}/python2.7/ssl.* \
429 ${libdir}/python2.7/tempfile.* \
430 ${libdir}/python2.7/StringIO.* \
431 ${libdir}/python2.7/io.* \
432 ${libdir}/python2.7/_pyio.* \
433"
434
435SUMMARY_${PN}-json="Python JSON support"
436RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re ${PN}-codecs"
437FILES_${PN}-json=" \
438 ${libdir}/python2.7/json \
439 ${libdir}/python2.7/lib-dynload/_json.so \
440"
441
442SUMMARY_${PN}-lang="Python low-level language support"
443RDEPENDS_${PN}-lang="${PN}-core"
444FILES_${PN}-lang=" \
445 ${libdir}/python2.7/lib-dynload/_bisect.so \
446 ${libdir}/python2.7/lib-dynload/_collections.so \
447 ${libdir}/python2.7/lib-dynload/_heapq.so \
448 ${libdir}/python2.7/lib-dynload/_weakref.so \
449 ${libdir}/python2.7/lib-dynload/_functools.so \
450 ${libdir}/python2.7/lib-dynload/array.so \
451 ${libdir}/python2.7/lib-dynload/itertools.so \
452 ${libdir}/python2.7/lib-dynload/operator.so \
453 ${libdir}/python2.7/lib-dynload/parser.so \
454 ${libdir}/python2.7/atexit.* \
455 ${libdir}/python2.7/bisect.* \
456 ${libdir}/python2.7/code.* \
457 ${libdir}/python2.7/codeop.* \
458 ${libdir}/python2.7/collections.* \
459 ${libdir}/python2.7/dis.* \
460 ${libdir}/python2.7/functools.* \
461 ${libdir}/python2.7/heapq.* \
462 ${libdir}/python2.7/inspect.* \
463 ${libdir}/python2.7/keyword.* \
464 ${libdir}/python2.7/opcode.* \
465 ${libdir}/python2.7/symbol.* \
466 ${libdir}/python2.7/repr.* \
467 ${libdir}/python2.7/token.* \
468 ${libdir}/python2.7/tokenize.* \
469 ${libdir}/python2.7/traceback.* \
470 ${libdir}/python2.7/weakref.* \
471"
472
473SUMMARY_${PN}-logging="Python logging support"
474RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
475FILES_${PN}-logging=" \
476 ${libdir}/python2.7/logging \
477"
478
479SUMMARY_${PN}-mailbox="Python mailbox format support"
480RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
481FILES_${PN}-mailbox=" \
482 ${libdir}/python2.7/mailbox.* \
483"
484
485SUMMARY_${PN}-math="Python math support"
486RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
487FILES_${PN}-math=" \
488 ${libdir}/python2.7/lib-dynload/cmath.so \
489 ${libdir}/python2.7/lib-dynload/math.so \
490 ${libdir}/python2.7/lib-dynload/_random.so \
491 ${libdir}/python2.7/random.* \
492 ${libdir}/python2.7/sets.* \
493"
494
495SUMMARY_${PN}-mime="Python MIME handling APIs"
496RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
497FILES_${PN}-mime=" \
498 ${libdir}/python2.7/mimetools.* \
499 ${libdir}/python2.7/uu.* \
500 ${libdir}/python2.7/quopri.* \
501 ${libdir}/python2.7/rfc822.* \
502 ${libdir}/python2.7/MimeWriter.* \
503"
504
505SUMMARY_${PN}-mmap="Python memory-mapped file support"
506RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
507FILES_${PN}-mmap=" \
508 ${libdir}/python2.7/lib-dynload/mmap.so \
509"
510
511SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
512RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
513FILES_${PN}-multiprocessing=" \
514 ${libdir}/python2.7/lib-dynload/_multiprocessing.so \
515 ${libdir}/python2.7/multiprocessing \
516"
517
518SUMMARY_${PN}-netclient="Python Internet Protocol clients"
519RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
520FILES_${PN}-netclient=" \
521 ${libdir}/python2.7/*Cookie*.* \
522 ${libdir}/python2.7/base64.* \
523 ${libdir}/python2.7/cookielib.* \
524 ${libdir}/python2.7/ftplib.* \
525 ${libdir}/python2.7/gopherlib.* \
526 ${libdir}/python2.7/hmac.* \
527 ${libdir}/python2.7/httplib.* \
528 ${libdir}/python2.7/mimetypes.* \
529 ${libdir}/python2.7/nntplib.* \
530 ${libdir}/python2.7/poplib.* \
531 ${libdir}/python2.7/smtplib.* \
532 ${libdir}/python2.7/telnetlib.* \
533 ${libdir}/python2.7/urllib.* \
534 ${libdir}/python2.7/urllib2.* \
535 ${libdir}/python2.7/urlparse.* \
536 ${libdir}/python2.7/uuid.* \
537 ${libdir}/python2.7/rfc822.* \
538 ${libdir}/python2.7/mimetools.* \
539"
540
541SUMMARY_${PN}-netserver="Python Internet Protocol servers"
542RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
543FILES_${PN}-netserver=" \
544 ${libdir}/python2.7/cgi.* \
545 ${libdir}/python2.7/*HTTPServer.* \
546 ${libdir}/python2.7/SocketServer.* \
547"
548
549SUMMARY_${PN}-numbers="Python number APIs"
550RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
551FILES_${PN}-numbers=" \
552 ${libdir}/python2.7/decimal.* \
553 ${libdir}/python2.7/fractions.* \
554 ${libdir}/python2.7/numbers.* \
555"
556
557SUMMARY_${PN}-pickle="Python serialisation/persistence support"
558RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
559FILES_${PN}-pickle=" \
560 ${libdir}/python2.7/pickle.* \
561 ${libdir}/python2.7/shelve.* \
562 ${libdir}/python2.7/lib-dynload/cPickle.so \
563 ${libdir}/python2.7/pickletools.* \
564"
565
566SUMMARY_${PN}-pkgutil="Python package extension utility support"
567RDEPENDS_${PN}-pkgutil="${PN}-core"
568FILES_${PN}-pkgutil=" \
569 ${libdir}/python2.7/pkgutil.* \
570"
571
572SUMMARY_${PN}-plistlib="Generate and parse Mac OS X .plist files"
573RDEPENDS_${PN}-plistlib="${PN}-core ${PN}-datetime ${PN}-io"
574FILES_${PN}-plistlib=" \
575 ${libdir}/python2.7/plistlib.* \
576"
577
578SUMMARY_${PN}-pprint="Python pretty-print support"
579RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
580FILES_${PN}-pprint=" \
581 ${libdir}/python2.7/pprint.* \
582"
583
584SUMMARY_${PN}-profile="Python basic performance profiling support"
585RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
586FILES_${PN}-profile=" \
587 ${libdir}/python2.7/profile.* \
588 ${libdir}/python2.7/pstats.* \
589 ${libdir}/python2.7/cProfile.* \
590 ${libdir}/python2.7/lib-dynload/_lsprof.so \
591"
592
593SUMMARY_${PN}-pydoc="Python interactive help support"
594RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
595FILES_${PN}-pydoc=" \
596 ${bindir}/pydoc \
597 ${libdir}/python2.7/pydoc.* \
598 ${libdir}/python2.7/pydoc_data \
599"
600
601SUMMARY_${PN}-re="Python Regular Expression APIs"
602RDEPENDS_${PN}-re="${PN}-core"
603FILES_${PN}-re=" \
604 ${libdir}/python2.7/re.* \
605 ${libdir}/python2.7/sre.* \
606 ${libdir}/python2.7/sre_compile.* \
607 ${libdir}/python2.7/sre_constants* \
608 ${libdir}/python2.7/sre_parse.* \
609"
610
611SUMMARY_${PN}-readline="Python readline support"
612RDEPENDS_${PN}-readline="${PN}-core"
613FILES_${PN}-readline=" \
614 ${libdir}/python2.7/lib-dynload/readline.so \
615 ${libdir}/python2.7/rlcompleter.* \
616"
617
618SUMMARY_${PN}-resource="Python resource control interface"
619RDEPENDS_${PN}-resource="${PN}-core"
620FILES_${PN}-resource=" \
621 ${libdir}/python2.7/lib-dynload/resource.so \
622"
623
624SUMMARY_${PN}-robotparser="Python robots.txt parser"
625RDEPENDS_${PN}-robotparser="${PN}-core ${PN}-netclient"
626FILES_${PN}-robotparser=" \
627 ${libdir}/python2.7/robotparser.* \
628"
629
630SUMMARY_${PN}-runpy="Python script for locating/executing scripts in module namespace"
631RDEPENDS_${PN}-runpy="${PN}-core ${PN}-pkgutil"
632FILES_${PN}-runpy=" \
633 ${libdir}/python2.7/runpy.* \
634"
635
636SUMMARY_${PN}-shell="Python shell-like functionality"
637RDEPENDS_${PN}-shell="${PN}-core ${PN}-re"
638FILES_${PN}-shell=" \
639 ${libdir}/python2.7/cmd.* \
640 ${libdir}/python2.7/commands.* \
641 ${libdir}/python2.7/dircache.* \
642 ${libdir}/python2.7/fnmatch.* \
643 ${libdir}/python2.7/glob.* \
644 ${libdir}/python2.7/popen2.* \
645 ${libdir}/python2.7/shlex.* \
646 ${libdir}/python2.7/shutil.* \
647"
648
649SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
650RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
651FILES_${PN}-smtpd=" \
652 ${bindir}/smtpd.* \
653 ${libdir}/python2.7/smtpd.* \
654"
655
656SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
657RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading ${PN}-zlib"
658FILES_${PN}-sqlite3=" \
659 ${libdir}/python2.7/lib-dynload/_sqlite3.so \
660 ${libdir}/python2.7/sqlite3/dbapi2.* \
661 ${libdir}/python2.7/sqlite3/__init__.* \
662 ${libdir}/python2.7/sqlite3/dump.* \
663"
664
665SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
666RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
667FILES_${PN}-sqlite3-tests=" \
668 ${libdir}/python2.7/sqlite3/test \
669"
670
671SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
672RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
673FILES_${PN}-stringold=" \
674 ${libdir}/python2.7/lib-dynload/strop.so \
675 ${libdir}/python2.7/string.* \
676 ${libdir}/python2.7/stringold.* \
677"
678
679SUMMARY_${PN}-subprocess="Python subprocess support"
680RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle"
681FILES_${PN}-subprocess=" \
682 ${libdir}/python2.7/subprocess.* \
683"
684
685SUMMARY_${PN}-syslog="Python syslog interface"
686RDEPENDS_${PN}-syslog="${PN}-core"
687FILES_${PN}-syslog=" \
688 ${libdir}/python2.7/lib-dynload/syslog.so \
689"
690
691SUMMARY_${PN}-terminal="Python terminal controlling support"
692RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
693FILES_${PN}-terminal=" \
694 ${libdir}/python2.7/pty.* \
695 ${libdir}/python2.7/tty.* \
696"
697
698SUMMARY_${PN}-tests="Python tests"
699RDEPENDS_${PN}-tests="${PN}-core ${PN}-modules"
700FILES_${PN}-tests=" \
701 ${libdir}/python2.7/test \
702"
703
704SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
705RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
706FILES_${PN}-textutils=" \
707 ${libdir}/python2.7/lib-dynload/_csv.so \
708 ${libdir}/python2.7/csv.* \
709 ${libdir}/python2.7/optparse.* \
710 ${libdir}/python2.7/textwrap.* \
711"
712
713SUMMARY_${PN}-threading="Python threading & synchronization support"
714RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
715FILES_${PN}-threading=" \
716 ${libdir}/python2.7/_threading_local.* \
717 ${libdir}/python2.7/dummy_thread.* \
718 ${libdir}/python2.7/dummy_threading.* \
719 ${libdir}/python2.7/mutex.* \
720 ${libdir}/python2.7/threading.* \
721 ${libdir}/python2.7/Queue.* \
722"
723
724SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
725RDEPENDS_${PN}-tkinter="${PN}-core"
726FILES_${PN}-tkinter=" \
727 ${libdir}/python2.7/lib-dynload/_tkinter.so \
728 ${libdir}/python2.7/lib-tk \
729"
730
731SUMMARY_${PN}-unittest="Python unit testing framework"
732RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
733FILES_${PN}-unittest=" \
734 ${libdir}/python2.7/unittest/ \
735"
736
737SUMMARY_${PN}-unixadmin="Python Unix administration support"
738RDEPENDS_${PN}-unixadmin="${PN}-core"
739FILES_${PN}-unixadmin=" \
740 ${libdir}/python2.7/lib-dynload/nis.so \
741 ${libdir}/python2.7/lib-dynload/grp.so \
742 ${libdir}/python2.7/lib-dynload/pwd.so \
743 ${libdir}/python2.7/getpass.* \
744"
745
746SUMMARY_${PN}-xml="Python basic XML support"
747RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
748FILES_${PN}-xml=" \
749 ${libdir}/python2.7/lib-dynload/_elementtree.so \
750 ${libdir}/python2.7/lib-dynload/pyexpat.so \
751 ${libdir}/python2.7/xml \
752 ${libdir}/python2.7/xmllib.* \
753"
754
755SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
756RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
757FILES_${PN}-xmlrpc=" \
758 ${libdir}/python2.7/xmlrpclib.* \
759 ${libdir}/python2.7/SimpleXMLRPCServer.* \
760 ${libdir}/python2.7/DocXMLRPCServer.* \
761"
762
763SUMMARY_${PN}-zlib="Python zlib compression support"
764RDEPENDS_${PN}-zlib="${PN}-core"
765FILES_${PN}-zlib=" \
766 ${libdir}/python2.7/lib-dynload/zlib.so \
767"
768
769SUMMARY_${PN}-modules="All Python modules"
770RDEPENDS_${PN}-modules=" \
771 ${PN}-2to3 \
772 ${PN}-argparse \
773 ${PN}-audio \
774 ${PN}-bsddb \
775 ${PN}-codecs \
776 ${PN}-compile \
777 ${PN}-compiler \
778 ${PN}-compression \
779 ${PN}-contextlib \
780 ${PN}-core \
781 ${PN}-crypt \
782 ${PN}-ctypes \
783 ${PN}-curses \
784 ${PN}-datetime \
785 ${PN}-db \
786 ${PN}-debugger \
787 ${PN}-difflib \
788 ${PN}-distutils \
789 ${PN}-doctest \
790 ${PN}-email \
791 ${PN}-fcntl \
792 ${PN}-gdbm \
793 ${PN}-hotshot \
794 ${PN}-html \
795 ${PN}-idle \
796 ${PN}-image \
797 ${PN}-importlib \
798 ${PN}-io \
799 ${PN}-json \
800 ${PN}-lang \
801 ${PN}-logging \
802 ${PN}-mailbox \
803 ${PN}-math \
804 ${PN}-mime \
805 ${PN}-mmap \
806 ${PN}-multiprocessing \
807 ${PN}-netclient \
808 ${PN}-netserver \
809 ${PN}-numbers \
810 ${PN}-pickle \
811 ${PN}-pkgutil \
812 ${PN}-plistlib \
813 ${PN}-pprint \
814 ${PN}-profile \
815 ${PN}-pydoc \
816 ${PN}-re \
817 ${PN}-readline \
818 ${PN}-resource \
819 ${PN}-robotparser \
820 ${PN}-runpy \
821 ${PN}-shell \
822 ${PN}-smtpd \
823 ${PN}-sqlite3 \
824 ${PN}-sqlite3-tests \
825 ${PN}-stringold \
826 ${PN}-subprocess \
827 ${PN}-syslog \
828 ${PN}-terminal \
829 ${PN}-textutils \
830 ${PN}-threading \
831 ${PN}-tkinter \
832 ${PN}-unittest \
833 ${PN}-unixadmin \
834 ${PN}-xml \
835 ${PN}-xmlrpc \
836 ${PN}-zlib \
837"
838ALLOW_EMPTY_${PN}-modules = "1"
839
840
diff --git a/meta/recipes-devtools/python/python-native-2.7-manifest.inc b/meta/recipes-devtools/python/python-native-2.7-manifest.inc
deleted file mode 100644
index b05aae0f18..0000000000
--- a/meta/recipes-devtools/python/python-native-2.7-manifest.inc
+++ /dev/null
@@ -1,9 +0,0 @@
1
2# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
3# Generator: '../scripts/contrib/python/generate-manifest-2.7.py --native' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
4
5
6
7RPROVIDES += "python-modules-native python-2to3-native python-argparse-native python-audio-native python-bsddb-native python-codecs-native python-compile-native python-compiler-native python-compression-native python-contextlib-native python-core-native python-crypt-native python-ctypes-native python-curses-native python-datetime-native python-db-native python-debugger-native python-dev-native python-difflib-native python-distutils-native python-distutils-staticdev-native python-doctest-native python-email-native python-fcntl-native python-gdbm-native python-hotshot-native python-html-native python-idle-native python-image-native python-importlib-native python-io-native python-json-native python-lang-native python-logging-native python-mailbox-native python-math-native python-mime-native python-mmap-native python-multiprocessing-native python-netclient-native python-netserver-native python-numbers-native python-pickle-native python-pkgutil-native python-plistlib-native python-pprint-native python-profile-native python-pydoc-native python-re-native python-readline-native python-resource-native python-robotparser-native python-shell-native python-smtpd-native python-sqlite3-native python-sqlite3-tests-native python-stringold-native python-subprocess-native python-syslog-native python-terminal-native python-tests-native python-textutils-native python-threading-native python-tkinter-native python-unittest-native python-unixadmin-native python-xml-native python-xmlrpc-native python-zlib-native"
8
9
diff --git a/meta/recipes-devtools/python/python-native_2.7.13.bb b/meta/recipes-devtools/python/python-native_2.7.13.bb
index 7edf153489..2b74003c79 100644
--- a/meta/recipes-devtools/python/python-native_2.7.13.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.13.bb
@@ -1,5 +1,4 @@
1require python.inc 1require python.inc
2
3EXTRANATIVEPATH += "bzip2-native" 2EXTRANATIVEPATH += "bzip2-native"
4DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native" 3DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native"
5PR = "${INC_PR}.1" 4PR = "${INC_PR}.1"
@@ -25,8 +24,6 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
25 24
26inherit native 25inherit native
27 26
28require python-native-${PYTHON_MAJMIN}-manifest.inc
29
30EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}" 27EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
31 28
32EXTRA_OEMAKE = '\ 29EXTRA_OEMAKE = '\
@@ -59,3 +56,24 @@ do_install() {
59 # installed in the native sysroot, so disable user site support. 56 # installed in the native sysroot, so disable user site support.
60 sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py 57 sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
61} 58}
59
60python(){
61
62 # Read JSON manifest
63 import json
64 pythondir = d.getVar('THISDIR',True)
65 with open(pythondir+'/python/python2-manifest.json') as manifest_file:
66 python_manifest=json.load(manifest_file)
67
68 rprovides = d.getVar('RPROVIDES').split()
69
70 # Hardcoded since it cant be python-native-foo, should be python-foo-native
71 pn = 'python'
72
73 for key in python_manifest:
74 pypackage = pn + '-' + key + '-native'
75 if pypackage not in rprovides:
76 rprovides.append(pypackage)
77
78 d.setVar('RPROVIDES', ' '.join(rprovides))
79}
diff --git a/meta/recipes-devtools/python/python/create_manifest2.py b/meta/recipes-devtools/python/python/create_manifest2.py
new file mode 100644
index 0000000000..bd64ec3ee7
--- /dev/null
+++ b/meta/recipes-devtools/python/python/create_manifest2.py
@@ -0,0 +1,277 @@
1# This script is used as a bitbake task to create a new python manifest
2# $ bitbake python -c create_manifest
3#
4# Our goal is to keep python-core as small as posible and add other python
5# packages only when the user needs them, hence why we split upstream python
6# into several packages.
7#
8# In a very simplistic way what this does is:
9# Launch python and see specifically what is required for it to run at a minimum
10#
11# Go through the python-manifest file and launch a separate task for every single
12# one of the files on each package, this task will check what was required for that
13# specific module to run, these modules will be called dependencies.
14# The output of such task will be a list of the modules or dependencies that were
15# found for that file.
16#
17# Such output will be parsed by this script, we will look for each dependency on the
18# manifest and if we find that another package already includes it, then we will add
19# that package as an RDEPENDS to the package we are currently checking; in case we dont
20# find the current dependency on any other package we will add it to the current package
21# as part of FILES.
22#
23#
24# This way we will create a new manifest from the data structure that was built during
25# this process, ont this new manifest each package will contain specifically only
26# what it needs to run.
27#
28# There are some caveats which we try to deal with, such as repeated files on different
29# packages, packages that include folders, wildcards, and special packages.
30# Its also important to note that this method only works for python files, and shared
31# libraries. Static libraries, header files and binaries need to be dealt with manually.
32#
33# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
34
35
36import sys
37import subprocess
38import json
39import os
40
41# Hack to get native python search path (for folders), not fond of it but it works for now
42pivot='recipe-sysroot-native'
43for p in sys.path:
44 if pivot in p:
45 nativelibfolder=p[:p.find(pivot)+len(pivot)]
46
47# Empty dict to hold the whole manifest
48new_manifest = {}
49
50# Check for repeated files, folders and wildcards
51allfiles=[]
52repeated=[]
53wildcards=[]
54
55hasfolders=[]
56allfolders=[]
57
58def isFolder(value):
59 if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
60 return True
61 else:
62 return False
63
64# Read existing JSON manifest
65with open('python2-manifest.json') as manifest:
66 old_manifest=json.load(manifest)
67
68
69# First pass to get core-package functionality, because we base everything on the fact that core is actually working
70# Not exactly the same so it should not be a function
71print ("Getting dependencies for core package:")
72
73# Special call to check for core package
74output = subprocess.check_output([sys.executable, 'get_module_deps2.py', 'python-core-package'])
75for item in output.split():
76 # We append it so it doesnt hurt what we currently have:
77 if item not in old_manifest['core']['files']:
78 # We use the same data structure since its the one which will be used to check
79 # dependencies for other packages
80 old_manifest['core']['files'].append(item)
81
82for value in old_manifest['core']['files']:
83 # Ignore folders, since we don't import those, difficult to handle multilib
84 if isFolder(value):
85 # Pass it directly
86 if value not in old_manifest['core']['files']:
87 old_manifest['core']['files'].append(value)
88 # Ignore binaries, since we don't import those, assume it was added correctly (manually)
89 if '${bindir}' in value:
90 # Pass it directly
91 if value not in old_manifest['core']['files']:
92 old_manifest['core']['files'].append(value)
93 continue
94 # Ignore empty values
95 if value == '':
96 continue
97 if '${includedir}' in value:
98 if value not in old_manifest['core']['files']:
99 old_manifest['core']['files'].append(value)
100 continue
101 # Get module name , shouldnt be affected by libdir/bindir
102 value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
103
104
105 # Launch separate task for each module for deterministic behavior
106 # Each module will only import what is necessary for it to work in specific
107 print ('Getting dependencies for module: %s' % value)
108 output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
109 for item in output.split():
110 # We append it so it doesnt hurt what we currently have:
111 if item not in old_manifest['core']['files']:
112 old_manifest['core']['files'].append(item)
113
114# We check which packages include folders
115for key in old_manifest:
116 for value in old_manifest[key]['files']:
117 # Ignore folders, since we don't import those, difficult to handle multilib
118 if isFolder(value):
119 print ('%s is a folder' % value)
120 if key not in hasfolders:
121 hasfolders.append(key)
122 if value not in allfolders:
123 allfolders.append(value)
124
125for key in old_manifest:
126 # Use an empty dict as data structure to hold data for each package and fill it up
127 new_manifest[key]={}
128 new_manifest[key]['files']=[]
129 new_manifest[key]['rdepends']=[]
130 # All packages should depend on core
131 if key != 'core':
132 new_manifest[key]['rdepends'].append('core')
133 new_manifest[key]['summary']=old_manifest[key]['summary']
134
135 # Handle special cases, we assume that when they were manually added
136 # to the manifest we knew what we were doing.
137 print ('Handling package %s' % key)
138 special_packages=['misc', 'modules', 'dev']
139 if key in special_packages or 'staticdev' in key:
140 print('Passing %s package directly' % key)
141 new_manifest[key]=old_manifest[key]
142 continue
143
144 for value in old_manifest[key]['files']:
145 # We already handled core on the first pass
146 if key == 'core':
147 new_manifest[key]['files'].append(value)
148 continue
149 # Ignore folders, since we don't import those, difficult to handle multilib
150 if isFolder(value):
151 # Pass folders directly
152 new_manifest[key]['files'].append(value)
153 # Ignore binaries, since we don't import those
154 if '${bindir}' in value:
155 # Pass it directly to the new manifest data structure
156 if value not in new_manifest[key]['files']:
157 new_manifest[key]['files'].append(value)
158 continue
159 # Ignore empty values
160 if value == '':
161 continue
162 if '${includedir}' in value:
163 if value not in new_manifest[key]['files']:
164 new_manifest[key]['files'].append(value)
165 continue
166 # Get module name , shouldnt be affected by libdir/bindir
167 value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0]
168
169 # Launch separate task for each module for deterministic behavior
170 # Each module will only import what is necessary for it to work in specific
171 print ('Getting dependencies for module: %s' % value)
172 output = subprocess.check_output([sys.executable, 'get_module_deps2.py', '%s' % value])
173
174 # We can print dependencies for debugging purposes
175 #print (output)
176 # Output will have all dependencies
177 for item in output.split():
178
179 # Warning: This first part is ugly
180 # One of the dependencies that was found, could be inside of one of the folders included by another package
181 # We need to check if this happens so we can add the package containing the folder as an RDEPENDS
182 # e.g. Folder encodings contained in codecs
183 # This would be solved if no packages included any folders
184
185 # This can be done in two ways:
186 # 1 - We assume that if we take out the filename from the path we would get
187 # the folder string, then we would check if folder string is in the list of folders
188 # This would not work if a package contains a folder which contains another folder
189 # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
190 # folder_string would not match any value contained in the list of folders
191 #
192 # 2 - We do it the other way around, checking if the folder is contained in the path
193 # e.g. path/folder1/folder2/filename folder_string= path/folder1/folder2
194 # is folder_string inside path/folder1/folder2/filename?,
195 # Yes, it works, but we waste a couple of milliseconds.
196
197 inFolders=False
198 for folder in allfolders:
199 if folder in item:
200 inFolders = True # Did we find a folder?
201 folderFound = False # Second flag to break inner for
202 # Loop only through packages which contain folders
203 for keyfolder in hasfolders:
204 if (folderFound == False):
205 #print("Checking folder %s on package %s" % (item,keyfolder))
206 for file_folder in old_manifest[keyfolder]['files']:
207 if file_folder==folder:
208 print ('%s found in %s' % (folder, keyfolder))
209 folderFound = True
210 if keyfolder not in new_manifest[key]['rdepends'] and keyfolder != key:
211 new_manifest[key]['rdepends'].append(keyfolder)
212 else:
213 break
214
215 # A folder was found so we're done with this item, we can go on
216 if inFolders:
217 continue
218
219 # We might already have it on the dictionary since it could depend on a (previously checked) module
220 if item not in new_manifest[key]['files']:
221 # Handle core as a special package, we already did it so we pass it to NEW data structure directly
222 if key=='core':
223 print('Adding %s to %s FILES' % (item, key))
224 if item.endswith('*'):
225 wildcards.append(item)
226 new_manifest[key]['files'].append(item)
227
228 # Check for repeated files
229 if item not in allfiles:
230 allfiles.append(item)
231 else:
232 repeated.append(item)
233
234 else:
235
236 # Check if this dependency is already contained on another package, so we add it
237 # as an RDEPENDS, or if its not, it means it should be contained on the current
238 # package, so we should add it to FILES
239 for newkey in old_manifest:
240 # Debug
241 #print("Checking %s " % item + " in %s" % newkey)
242 if item in old_manifest[newkey]['files']:
243 # Since were nesting, we need to check its not the same key
244 if(newkey!=key):
245 if newkey not in new_manifest[key]['rdepends']:
246 # Add it to the new manifest data struct
247 # Debug
248 print('Adding %s to %s RDEPENDS, because it contains %s' % (newkey, key, item))
249 new_manifest[key]['rdepends'].append(newkey)
250 break
251 else:
252 # Debug
253 print('Adding %s to %s FILES' % (item, key))
254 # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package
255 new_manifest[key]['files'].append(item)
256 if item.endswith('*'):
257 wildcards.append(item)
258 if item not in allfiles:
259 allfiles.append(item)
260 else:
261 repeated.append(item)
262
263print ('The following files are repeated (contained in more than one package), please check which package should get it:')
264print (repeated)
265print('The following files contain wildcards, please check they are necessary')
266print(wildcards)
267print('The following files contain folders, please check they are necessary')
268print(hasfolders)
269
270# Sort it just so it looks nice
271for key in new_manifest:
272 new_manifest[key]['files'].sort()
273 new_manifest[key]['rdepends'].sort()
274
275# Create the manifest from the data structure that was built
276with open('python2-manifest.json.new','w') as outfile:
277 json.dump(new_manifest,outfile,sort_keys=True, indent=4)
diff --git a/meta/recipes-devtools/python/python/get_module_deps2.py b/meta/recipes-devtools/python/python/get_module_deps2.py
new file mode 100644
index 0000000000..73e7c6f6dc
--- /dev/null
+++ b/meta/recipes-devtools/python/python/get_module_deps2.py
@@ -0,0 +1,112 @@
1# This script is launched on separate task for each python module
2# It checks for dependencies for that specific module and prints
3# them out, the output of this execution will have all dependencies
4# for a specific module, which will be parsed an dealt on create_manifest.py
5#
6# Author: Alejandro Enedino Hernandez Samaniego "aehs29" <aehs29@gmail.com>
7
8
9# We can get a log per module, for all the dependencies that were found, but its messy.
10debug=False
11
12import sys
13
14# We can get a list of the modules which are currently required to run python
15# so we run python-core and get its modules, we then import what we need
16# and check what modules are currently running, if we substract them from the
17# modules we had initially, we get the dependencies for the module we imported.
18
19# We use importlib to achieve this, so we also need to know what modules importlib needs
20import importlib
21
22core_deps=set(sys.modules)
23
24def fix_path(dep_path):
25 import os
26 # We DONT want the path on our HOST system
27 pivot='recipe-sysroot-native'
28 dep_path=dep_path[dep_path.find(pivot)+len(pivot):]
29
30 if '/usr/bin' in dep_path:
31 dep_path = dep_path.replace('/usr/bin''${bindir}')
32
33 # Handle multilib, is there a better way?
34 if '/usr/lib32' in dep_path:
35 dep_path = dep_path.replace('/usr/lib32','${libdir}')
36 if '/usr/lib64' in dep_path:
37 dep_path = dep_path.replace('/usr/lib64','${libdir}')
38 if '/usr/lib' in dep_path:
39 dep_path = dep_path.replace('/usr/lib','${libdir}')
40 if '/usr/include' in dep_path:
41 dep_path = dep_path.replace('/usr/include','${includedir}')
42 if '__init__.' in dep_path:
43 dep_path = os.path.split(dep_path)[0]
44
45 # If a *.pyc file was imported, we replace it with *.py (since we deal with PYCs on create_manifest)
46 if '.pyc' in dep_path:
47 dep_path = dep_path.replace('.pyc','.py')
48
49 return dep_path
50
51# Module to import was passed as an argument
52current_module = str(sys.argv[1]).rstrip()
53if(debug==True):
54 log = open('log_%s' % current_module,'w')
55 log.write('Module %s generated the following dependencies:\n' % current_module)
56try:
57 importlib.import_module('%s' % current_module)
58except ImportError as e:
59 if (debug==True):
60 log.write('Module was not found')
61 pass
62
63
64# Get current module dependencies, dif will contain a list of specific deps for this module
65module_deps=set(sys.modules)
66
67# We handle the core package (1st pass on create_manifest.py) as a special case
68if current_module == 'python-core-package':
69 dif = core_deps
70else:
71 dif = module_deps-core_deps
72
73
74# Check where each dependency came from
75for item in dif:
76 dep_path=''
77 try:
78 if (debug==True):
79 log.write('Calling: sys.modules[' + '%s' % item + '].__file__\n')
80 dep_path = sys.modules['%s' % item].__file__
81 except AttributeError as e:
82 # Deals with thread (builtin module) not having __file__ attribute
83 if debug==True:
84 log.write(item + ' ')
85 log.write(str(e))
86 log.write('\n')
87 pass
88 except NameError as e:
89 # Deals with NameError: name 'dep_path' is not defined
90 # because module is not found (wasn't compiled?), e.g. bddsm
91 if (debug==True):
92 log.write(item+' ')
93 log.write(str(e))
94 pass
95
96 # Site-customize is a special case since we (OpenEmbedded) put it there manually
97 if 'sitecustomize' in dep_path:
98 dep_path = '${libdir}/python2.7/sitecustomize.py'
99 # Prints out result, which is what will be used by create_manifest
100 print (dep_path)
101 continue
102
103 dep_path = fix_path(dep_path)
104
105 if (debug==True):
106 log.write(dep_path+'\n')
107
108 # Prints out result, which is what will be used by create_manifest
109 print (dep_path)
110
111if debug==True:
112 log.close()
diff --git a/meta/recipes-devtools/python/python/python2-manifest.json b/meta/recipes-devtools/python/python/python2-manifest.json
new file mode 100644
index 0000000000..8ebc715fc1
--- /dev/null
+++ b/meta/recipes-devtools/python/python/python2-manifest.json
@@ -0,0 +1,1032 @@
1{
2 "2to3": {
3 "files": [
4 "${bindir}/2to3",
5 "${libdir}/python2.7/lib2to3"
6 ],
7 "rdepends": [
8 "core"
9 ],
10 "summary": "Python automated Python 2 to 3 code translator"
11 },
12 "argparse": {
13 "files": [
14 "${libdir}/python2.7/argparse.py"
15 ],
16 "rdepends": [
17 "codecs",
18 "core",
19 "lang",
20 "textutils"
21 ],
22 "summary": "Python command line argument parser"
23 },
24 "audio": {
25 "files": [
26 "${libdir}/python2.7/audiodev.py",
27 "${libdir}/python2.7/chunk.py",
28 "${libdir}/python2.7/lib-dynload/audioop.so",
29 "${libdir}/python2.7/lib-dynload/ossaudiodev.so",
30 "${libdir}/python2.7/sndhdr.py",
31 "${libdir}/python2.7/sunau.py",
32 "${libdir}/python2.7/sunaudio.py",
33 "${libdir}/python2.7/toaiff.py",
34 "${libdir}/python2.7/wave.py"
35 ],
36 "rdepends": [
37 "core",
38 "crypt",
39 "fcntl",
40 "io",
41 "math"
42 ],
43 "summary": "Python Audio Handling"
44 },
45 "bsddb": {
46 "files": [
47 "${libdir}/python2.7/bsddb",
48 "${libdir}/python2.7/lib-dynload/_bsddb.so"
49 ],
50 "rdepends": [
51 "core"
52 ],
53 "summary": "Python bindings for the Berkeley Database"
54 },
55 "codecs": {
56 "files": [
57 "${libdir}/python2.7/gettext.py",
58 "${libdir}/python2.7/lib-dynload/_codecs_cn.so",
59 "${libdir}/python2.7/lib-dynload/_codecs_hk.so",
60 "${libdir}/python2.7/lib-dynload/_codecs_iso2022.so",
61 "${libdir}/python2.7/lib-dynload/_codecs_jp.so",
62 "${libdir}/python2.7/lib-dynload/_codecs_kr.so",
63 "${libdir}/python2.7/lib-dynload/_codecs_tw.so",
64 "${libdir}/python2.7/lib-dynload/_multibytecodec.so",
65 "${libdir}/python2.7/lib-dynload/unicodedata.so",
66 "${libdir}/python2.7/locale.py",
67 "${libdir}/python2.7/stringprep.py",
68 "${libdir}/python2.7/xdrlib.py"
69 ],
70 "rdepends": [
71 "core",
72 "io",
73 "lang"
74 ],
75 "summary": "Python codec"
76 },
77 "compile": {
78 "files": [
79 "${libdir}/python2.7/compileall.py",
80 "${libdir}/python2.7/py_compile.py"
81 ],
82 "rdepends": [
83 "core"
84 ],
85 "summary": "Python bytecode compilation support"
86 },
87 "compiler": {
88 "files": [
89 "${libdir}/python2.7/compiler"
90 ],
91 "rdepends": [
92 "core",
93 "io",
94 "lang"
95 ],
96 "summary": "Python compiler support"
97 },
98 "compression": {
99 "files": [
100 "${libdir}/python2.7/gzip.py",
101 "${libdir}/python2.7/lib-dynload/bz2.so",
102 "${libdir}/python2.7/tarfile.py",
103 "${libdir}/python2.7/zipfile.py"
104 ],
105 "rdepends": [
106 "core",
107 "io",
108 "shell",
109 "unixadmin",
110 "zlib"
111 ],
112 "summary": "Python high-level compression support"
113 },
114 "contextlib": {
115 "files": [
116 "${libdir}/python2.7/contextlib.py"
117 ],
118 "rdepends": [
119 "core",
120 "lang"
121 ],
122 "summary": "Python utilities for with-statementcontexts."
123 },
124 "core": {
125 "files": [
126 "${bindir}/python*",
127 "${includedir}/python2.7/pyconfig*.h",
128 "${libdir}/python2.7/ConfigParser.py",
129 "${libdir}/python2.7/UserDict.py",
130 "${libdir}/python2.7/UserList.py",
131 "${libdir}/python2.7/UserString.py",
132 "${libdir}/python2.7/__future__.py",
133 "${libdir}/python2.7/_abcoll.py",
134 "${libdir}/python2.7/_sysconfigdata.py",
135 "${libdir}/python2.7/_weakrefset.py",
136 "${libdir}/python2.7/abc.py",
137 "${libdir}/python2.7/ast.py",
138 "${libdir}/python2.7/atexit.py",
139 "${libdir}/python2.7/codecs.py",
140 "${libdir}/python2.7/collections.py",
141 "${libdir}/python2.7/copy.py",
142 "${libdir}/python2.7/copy_reg.py",
143 "${libdir}/python2.7/encodings",
144 "${libdir}/python2.7/encodings/aliases.py",
145 "${libdir}/python2.7/encodings/utf_8.py",
146 "${libdir}/python2.7/genericpath.py",
147 "${libdir}/python2.7/getopt.py",
148 "${libdir}/python2.7/heapq.py",
149 "${libdir}/python2.7/importlib",
150 "${libdir}/python2.7/keyword.py",
151 "${libdir}/python2.7/lib-dynload/_collections.so",
152 "${libdir}/python2.7/lib-dynload/_heapq.so",
153 "${libdir}/python2.7/lib-dynload/_locale.so",
154 "${libdir}/python2.7/lib-dynload/_struct.so",
155 "${libdir}/python2.7/lib-dynload/binascii.so",
156 "${libdir}/python2.7/lib-dynload/itertools.so",
157 "${libdir}/python2.7/lib-dynload/operator.so",
158 "${libdir}/python2.7/lib-dynload/readline.so",
159 "${libdir}/python2.7/lib-dynload/strop.so",
160 "${libdir}/python2.7/lib-dynload/time.so",
161 "${libdir}/python2.7/lib-dynload/xreadlines.so",
162 "${libdir}/python2.7/linecache.py",
163 "${libdir}/python2.7/new.py",
164 "${libdir}/python2.7/os.py",
165 "${libdir}/python2.7/platform.py",
166 "${libdir}/python2.7/posixpath.py",
167 "${libdir}/python2.7/re.py",
168 "${libdir}/python2.7/rlcompleter.py",
169 "${libdir}/python2.7/site.py",
170 "${libdir}/python2.7/sitecustomize.py",
171 "${libdir}/python2.7/sre_compile.py",
172 "${libdir}/python2.7/sre_constants.py",
173 "${libdir}/python2.7/sre_parse.py",
174 "${libdir}/python2.7/stat.py",
175 "${libdir}/python2.7/string.py",
176 "${libdir}/python2.7/struct.py",
177 "${libdir}/python2.7/sysconfig.py",
178 "${libdir}/python2.7/traceback.py",
179 "${libdir}/python2.7/types.py",
180 "${libdir}/python2.7/warnings.py",
181 "${libdir}/python2.7/weakref.py"
182 ],
183 "rdepends": [],
184 "summary": "Python interpreter and core modules"
185 },
186 "crypt": {
187 "files": [
188 "${libdir}/python2.7/hashlib.py",
189 "${libdir}/python2.7/lib-dynload/_hashlib.so",
190 "${libdir}/python2.7/lib-dynload/crypt.so",
191 "${libdir}/python2.7/md5.py",
192 "${libdir}/python2.7/sha.py"
193 ],
194 "rdepends": [
195 "core"
196 ],
197 "summary": "Python basic cryptographic and hashing support"
198 },
199 "ctypes": {
200 "files": [
201 "${libdir}/python2.7/ctypes",
202 "${libdir}/python2.7/lib-dynload/_ctypes.so",
203 "${libdir}/python2.7/lib-dynload/_ctypes_test.so"
204 ],
205 "rdepends": [
206 "core"
207 ],
208 "summary": "Python C types support"
209 },
210 "curses": {
211 "files": [
212 "${libdir}/python2.7/curses",
213 "${libdir}/python2.7/lib-dynload/_curses.so",
214 "${libdir}/python2.7/lib-dynload/_curses_panel.so"
215 ],
216 "rdepends": [
217 "core"
218 ],
219 "summary": "Python curses support"
220 },
221 "datetime": {
222 "files": [
223 "${libdir}/python2.7/_strptime.py",
224 "${libdir}/python2.7/calendar.py",
225 "${libdir}/python2.7/lib-dynload/datetime.so"
226 ],
227 "rdepends": [
228 "codecs",
229 "core",
230 "lang"
231 ],
232 "summary": "Python calendar and time support"
233 },
234 "db": {
235 "files": [
236 "${libdir}/python2.7/anydbm.py",
237 "${libdir}/python2.7/dbhash.py",
238 "${libdir}/python2.7/dumbdbm.py",
239 "${libdir}/python2.7/lib-dynload/dbm.so",
240 "${libdir}/python2.7/whichdb.py"
241 ],
242 "rdepends": [
243 "bsddb",
244 "core",
245 "gdbm"
246 ],
247 "summary": "Python file-based database support"
248 },
249 "debugger": {
250 "files": [
251 "${libdir}/python2.7/bdb.py",
252 "${libdir}/python2.7/pdb.py"
253 ],
254 "rdepends": [
255 "core",
256 "io",
257 "lang",
258 "pprint",
259 "shell"
260 ],
261 "summary": "Python debugger"
262 },
263 "dev": {
264 "files": [
265 "${base_libdir}/*.a",
266 "${base_libdir}/*.o",
267 "${datadir}/aclocal",
268 "${datadir}/pkgconfig",
269 "${includedir}",
270 "${libdir}/*.a",
271 "${libdir}/*.la",
272 "${libdir}/*.o",
273 "${libdir}/lib*${SOLIBSDEV}",
274 "${libdir}/pkgconfig",
275 "${libdir}/python2.7/config/Makefile"
276 ],
277 "rdepends": [
278 "core"
279 ],
280 "summary": "Python development package"
281 },
282 "difflib": {
283 "files": [
284 "${libdir}/python2.7/difflib.py"
285 ],
286 "rdepends": [
287 "core",
288 "lang"
289 ],
290 "summary": "Python helpers for computing deltas between objects"
291 },
292 "distutils": {
293 "files": [
294 "${libdir}/python2.7/config",
295 "${libdir}/python2.7/distutils"
296 ],
297 "rdepends": [
298 "core"
299 ],
300 "summary": "Python Distribution Utilities"
301 },
302 "distutils-staticdev": {
303 "files": [
304 "${libdir}/python2.7/config/lib*.a"
305 ],
306 "rdepends": [
307 "distutils"
308 ],
309 "summary": "Python distribution utilities (static libraries)"
310 },
311 "doctest": {
312 "files": [
313 "${libdir}/python2.7/doctest.py"
314 ],
315 "rdepends": [
316 "core",
317 "crypt",
318 "debugger",
319 "difflib",
320 "fcntl",
321 "io",
322 "lang",
323 "math",
324 "pprint",
325 "shell",
326 "unittest"
327 ],
328 "summary": "Python framework for running examples in docstrings"
329 },
330 "email": {
331 "files": [
332 "${libdir}/python2.7/email",
333 "${libdir}/python2.7/imaplib.py"
334 ],
335 "rdepends": [
336 "contextlib",
337 "core",
338 "crypt",
339 "fcntl",
340 "io",
341 "lang",
342 "math",
343 "netclient",
344 "pickle",
345 "subprocess",
346 "textutils"
347 ],
348 "summary": "Python email support"
349 },
350 "fcntl": {
351 "files": [
352 "${libdir}/python2.7/lib-dynload/fcntl.so"
353 ],
354 "rdepends": [
355 "core"
356 ],
357 "summary": "Python's fcntl interface"
358 },
359 "gdbm": {
360 "files": [
361 "${libdir}/python2.7/lib-dynload/gdbm.so"
362 ],
363 "rdepends": [
364 "core"
365 ],
366 "summary": "Python GNU database support"
367 },
368 "hotshot": {
369 "files": [
370 "${libdir}/python2.7/hotshot",
371 "${libdir}/python2.7/lib-dynload/_hotshot.so"
372 ],
373 "rdepends": [
374 "core"
375 ],
376 "summary": "Python hotshot performance profiler"
377 },
378 "html": {
379 "files": [
380 "${libdir}/python2.7/HTMLParser.py",
381 "${libdir}/python2.7/formatter.py",
382 "${libdir}/python2.7/htmlentitydefs.py",
383 "${libdir}/python2.7/htmllib.py",
384 "${libdir}/python2.7/markupbase.py",
385 "${libdir}/python2.7/sgmllib.py"
386 ],
387 "rdepends": [
388 "core"
389 ],
390 "summary": "Python HTML processing support"
391 },
392 "idle": {
393 "files": [
394 "${bindir}/idle",
395 "${libdir}/python2.7/idlelib"
396 ],
397 "rdepends": [
398 "core"
399 ],
400 "summary": "Python Integrated Development Environment"
401 },
402 "image": {
403 "files": [
404 "${libdir}/python2.7/colorsys.py",
405 "${libdir}/python2.7/imghdr.py"
406 ],
407 "rdepends": [
408 "core"
409 ],
410 "summary": "Python graphical image handling"
411 },
412 "io": {
413 "files": [
414 "${libdir}/python2.7/StringIO.py",
415 "${libdir}/python2.7/_pyio.py",
416 "${libdir}/python2.7/io.py",
417 "${libdir}/python2.7/lib-dynload/_io.so",
418 "${libdir}/python2.7/lib-dynload/_socket.so",
419 "${libdir}/python2.7/lib-dynload/_ssl.so",
420 "${libdir}/python2.7/lib-dynload/cStringIO.so",
421 "${libdir}/python2.7/lib-dynload/select.so",
422 "${libdir}/python2.7/lib-dynload/termios.so",
423 "${libdir}/python2.7/pipes.py",
424 "${libdir}/python2.7/socket.py",
425 "${libdir}/python2.7/ssl.py",
426 "${libdir}/python2.7/tempfile.py"
427 ],
428 "rdepends": [
429 "contextlib",
430 "core",
431 "crypt",
432 "fcntl",
433 "lang",
434 "math",
435 "netclient",
436 "textutils"
437 ],
438 "summary": "Python low-level I/O"
439 },
440 "json": {
441 "files": [
442 "${libdir}/python2.7/json",
443 "${libdir}/python2.7/lib-dynload/_json.so"
444 ],
445 "rdepends": [
446 "core"
447 ],
448 "summary": "Python JSON support"
449 },
450 "lang": {
451 "files": [
452 "${libdir}/python2.7/bisect.py",
453 "${libdir}/python2.7/code.py",
454 "${libdir}/python2.7/codeop.py",
455 "${libdir}/python2.7/dis.py",
456 "${libdir}/python2.7/functools.py",
457 "${libdir}/python2.7/inspect.py",
458 "${libdir}/python2.7/lib-dynload/_bisect.so",
459 "${libdir}/python2.7/lib-dynload/_functools.so",
460 "${libdir}/python2.7/lib-dynload/array.so",
461 "${libdir}/python2.7/lib-dynload/parser.so",
462 "${libdir}/python2.7/opcode.py",
463 "${libdir}/python2.7/repr.py",
464 "${libdir}/python2.7/symbol.py",
465 "${libdir}/python2.7/token.py",
466 "${libdir}/python2.7/tokenize.py"
467 ],
468 "rdepends": [
469 "core"
470 ],
471 "summary": "Python low-level language support"
472 },
473 "logging": {
474 "files": [
475 "${libdir}/python2.7/logging"
476 ],
477 "rdepends": [
478 "core",
479 "io",
480 "threading"
481 ],
482 "summary": "Python logging support"
483 },
484 "mailbox": {
485 "files": [
486 "${libdir}/python2.7/mailbox.py"
487 ],
488 "rdepends": [
489 "codecs",
490 "contextlib",
491 "core",
492 "crypt",
493 "datetime",
494 "email",
495 "fcntl",
496 "io",
497 "lang",
498 "math",
499 "mime",
500 "netclient",
501 "textutils"
502 ],
503 "summary": "Python mailbox format support"
504 },
505 "math": {
506 "files": [
507 "${libdir}/python2.7/lib-dynload/_random.so",
508 "${libdir}/python2.7/lib-dynload/cmath.so",
509 "${libdir}/python2.7/lib-dynload/math.so",
510 "${libdir}/python2.7/random.py",
511 "${libdir}/python2.7/sets.py"
512 ],
513 "rdepends": [
514 "core",
515 "crypt"
516 ],
517 "summary": "Python math support"
518 },
519 "mime": {
520 "files": [
521 "${libdir}/python2.7/MimeWriter.py",
522 "${libdir}/python2.7/mimetools.py",
523 "${libdir}/python2.7/mimetypes.py",
524 "${libdir}/python2.7/quopri.py",
525 "${libdir}/python2.7/rfc822.py",
526 "${libdir}/python2.7/uu.py"
527 ],
528 "rdepends": [
529 "contextlib",
530 "core",
531 "crypt",
532 "fcntl",
533 "io",
534 "lang",
535 "math",
536 "netclient",
537 "textutils"
538 ],
539 "summary": "Python MIME handling APIs"
540 },
541 "mmap": {
542 "files": [
543 "${libdir}/python2.7/lib-dynload/mmap.so"
544 ],
545 "rdepends": [
546 "core"
547 ],
548 "summary": "Python memory-mapped file support"
549 },
550 "modules": {
551 "files": [],
552 "rdepends": [
553 "2to3",
554 "argparse",
555 "audio",
556 "bsddb",
557 "codecs",
558 "compile",
559 "compiler",
560 "compression",
561 "contextlib",
562 "core",
563 "crypt",
564 "ctypes",
565 "curses",
566 "datetime",
567 "db",
568 "debugger",
569 "difflib",
570 "distutils",
571 "doctest",
572 "email",
573 "fcntl",
574 "gdbm",
575 "hotshot",
576 "html",
577 "idle",
578 "image",
579 "io",
580 "json",
581 "lang",
582 "logging",
583 "mailbox",
584 "math",
585 "mime",
586 "mmap",
587 "multiprocessing",
588 "netclient",
589 "netserver",
590 "numbers",
591 "pickle",
592 "pkgutil",
593 "plistlib",
594 "pprint",
595 "profile",
596 "pydoc",
597 "re",
598 "resource",
599 "robotparser",
600 "shell",
601 "smtpd",
602 "sqlite3",
603 "sqlite3",
604 "stringold",
605 "subprocess",
606 "syslog",
607 "terminal",
608 "textutils",
609 "threading",
610 "tkinter",
611 "unittest",
612 "unixadmin",
613 "xml",
614 "xmlrpc",
615 "zlib"
616 ],
617 "summary": "All Python modules"
618 },
619 "multiprocessing": {
620 "files": [
621 "${libdir}/python2.7/lib-dynload/_multiprocessing.so",
622 "${libdir}/python2.7/multiprocessing"
623 ],
624 "rdepends": [
625 "core",
626 "fcntl",
627 "io",
628 "pickle",
629 "subprocess",
630 "threading"
631 ],
632 "summary": "Python multiprocessing support"
633 },
634 "netclient": {
635 "files": [
636 "${libdir}/python2.7/Cookie.py",
637 "${libdir}/python2.7/_LWPCookieJar.py",
638 "${libdir}/python2.7/_MozillaCookieJar.py",
639 "${libdir}/python2.7/base64.py",
640 "${libdir}/python2.7/cookielib.py",
641 "${libdir}/python2.7/ftplib.py",
642 "${libdir}/python2.7/hmac.py",
643 "${libdir}/python2.7/httplib.py",
644 "${libdir}/python2.7/nntplib.py",
645 "${libdir}/python2.7/poplib.py",
646 "${libdir}/python2.7/smtplib.py",
647 "${libdir}/python2.7/telnetlib.py",
648 "${libdir}/python2.7/urllib.py",
649 "${libdir}/python2.7/urllib2.py",
650 "${libdir}/python2.7/urlparse.py",
651 "${libdir}/python2.7/uuid.py"
652 ],
653 "rdepends": [
654 "codecs",
655 "contextlib",
656 "core",
657 "crypt",
658 "ctypes",
659 "datetime",
660 "email",
661 "fcntl",
662 "io",
663 "lang",
664 "math",
665 "mime",
666 "pickle",
667 "subprocess",
668 "textutils",
669 "threading"
670 ],
671 "summary": "Python Internet Protocol clients"
672 },
673 "netserver": {
674 "files": [
675 "${libdir}/python2.7/BaseHTTPServer.py",
676 "${libdir}/python2.7/CGIHTTPServer.py",
677 "${libdir}/python2.7/SimpleHTTPServer.py",
678 "${libdir}/python2.7/SocketServer.py",
679 "${libdir}/python2.7/cgi.py"
680 ],
681 "rdepends": [
682 "contextlib",
683 "core",
684 "crypt",
685 "fcntl",
686 "io",
687 "lang",
688 "math",
689 "mime",
690 "netclient",
691 "shell",
692 "textutils",
693 "threading",
694 "unixadmin"
695 ],
696 "summary": "Python Internet Protocol servers"
697 },
698 "numbers": {
699 "files": [
700 "${libdir}/python2.7/decimal.py",
701 "${libdir}/python2.7/fractions.py",
702 "${libdir}/python2.7/numbers.py"
703 ],
704 "rdepends": [
705 "codecs",
706 "core",
707 "lang",
708 "math",
709 "threading"
710 ],
711 "summary": "Python number APIs"
712 },
713 "pickle": {
714 "files": [
715 "${libdir}/python2.7/lib-dynload/cPickle.so",
716 "${libdir}/python2.7/pickle.py",
717 "${libdir}/python2.7/pickletools.py",
718 "${libdir}/python2.7/shelve.py"
719 ],
720 "rdepends": [
721 "core",
722 "io"
723 ],
724 "summary": "Python serialisation/persistence support"
725 },
726 "pkgutil": {
727 "files": [
728 "${libdir}/python2.7/pkgutil.py"
729 ],
730 "rdepends": [
731 "core"
732 ],
733 "summary": "Python package extension utility support"
734 },
735 "plistlib": {
736 "files": [
737 "${libdir}/python2.7/plistlib.py"
738 ],
739 "rdepends": [
740 "core",
741 "datetime",
742 "io"
743 ],
744 "summary": "Generate and parse Mac OS X .plist files"
745 },
746 "pprint": {
747 "files": [
748 "${libdir}/python2.7/pprint.py"
749 ],
750 "rdepends": [
751 "core",
752 "io"
753 ],
754 "summary": "Python pretty-print support"
755 },
756 "profile": {
757 "files": [
758 "${libdir}/python2.7/cProfile.py",
759 "${libdir}/python2.7/lib-dynload/_lsprof.so",
760 "${libdir}/python2.7/profile.py",
761 "${libdir}/python2.7/pstats.py"
762 ],
763 "rdepends": [
764 "codecs",
765 "core",
766 "lang",
767 "resource",
768 "textutils"
769 ],
770 "summary": "Python basic performance profiling support"
771 },
772 "pydoc": {
773 "files": [
774 "${bindir}/pydoc",
775 "${libdir}/python2.7/pydoc.py",
776 "${libdir}/python2.7/pydoc_data"
777 ],
778 "rdepends": [
779 "codecs",
780 "core",
781 "lang",
782 "pkgutil"
783 ],
784 "summary": "Python interactive help support"
785 },
786 "re": {
787 "files": [
788 "${libdir}/python2.7/sre.py"
789 ],
790 "rdepends": [
791 "core"
792 ],
793 "summary": "Python Regular Expression APIs"
794 },
795 "resource": {
796 "files": [
797 "${libdir}/python2.7/lib-dynload/resource.so"
798 ],
799 "rdepends": [
800 "core"
801 ],
802 "summary": "Python resource control interface"
803 },
804 "robotparser": {
805 "files": [
806 "${libdir}/python2.7/robotparser.py"
807 ],
808 "rdepends": [
809 "contextlib",
810 "core",
811 "io",
812 "lang",
813 "netclient",
814 "textutils"
815 ],
816 "summary": "Python robots.txt parser"
817 },
818 "shell": {
819 "files": [
820 "${libdir}/python2.7/cmd.py",
821 "${libdir}/python2.7/commands.py",
822 "${libdir}/python2.7/dircache.py",
823 "${libdir}/python2.7/fnmatch.py",
824 "${libdir}/python2.7/glob.py",
825 "${libdir}/python2.7/popen2.py",
826 "${libdir}/python2.7/shlex.py",
827 "${libdir}/python2.7/shutil.py"
828 ],
829 "rdepends": [
830 "core",
831 "io",
832 "unixadmin"
833 ],
834 "summary": "Python shell-like functionality"
835 },
836 "smtpd": {
837 "files": [
838 "${bindir}/smtpd.py",
839 "${libdir}/python2.7/asynchat.py",
840 "${libdir}/python2.7/asyncore.py",
841 "${libdir}/python2.7/smtpd.py"
842 ],
843 "rdepends": [
844 "core",
845 "fcntl",
846 "io",
847 "lang"
848 ],
849 "summary": "Python Simple Mail Transport Daemon"
850 },
851 "sqlite3": {
852 "files": [
853 "${libdir}/python2.7/lib-dynload/_sqlite3.so"
854 ],
855 "rdepends": [
856 "core"
857 ],
858 "summary": "Python Sqlite3 database support"
859 },
860 "sqlite3-tests": {
861 "files": [
862 "${libdir}/python2.7/sqlite3/test"
863 ],
864 "rdepends": [
865 "core",
866 "tests"
867 ],
868 "summary": "Python Sqlite3 database support tests"
869 },
870 "stringold": {
871 "files": [
872 "${libdir}/python2.7/stringold.py"
873 ],
874 "rdepends": [
875 "core"
876 ],
877 "summary": "Python string APIs [deprecated]"
878 },
879 "subprocess": {
880 "files": [
881 "${libdir}/python2.7/subprocess.py"
882 ],
883 "rdepends": [
884 "core",
885 "fcntl",
886 "io",
887 "pickle"
888 ],
889 "summary": "Python subprocess support"
890 },
891 "syslog": {
892 "files": [
893 "${libdir}/python2.7/lib-dynload/syslog.so"
894 ],
895 "rdepends": [
896 "core"
897 ],
898 "summary": "Python syslog interface"
899 },
900 "terminal": {
901 "files": [
902 "${libdir}/python2.7/pty.py",
903 "${libdir}/python2.7/tty.py"
904 ],
905 "rdepends": [
906 "core",
907 "io"
908 ],
909 "summary": "Python terminal controlling support"
910 },
911 "tests": {
912 "files": [
913 "${libdir}/python2.7/test"
914 ],
915 "rdepends": [
916 "core"
917 ],
918 "summary": "Python tests"
919 },
920 "textutils": {
921 "files": [
922 "${libdir}/python2.7/csv.py",
923 "${libdir}/python2.7/lib-dynload/_csv.so",
924 "${libdir}/python2.7/optparse.py",
925 "${libdir}/python2.7/textwrap.py"
926 ],
927 "rdepends": [
928 "codecs",
929 "core",
930 "io",
931 "lang"
932 ],
933 "summary": "Python option parsin"
934 },
935 "threading": {
936 "files": [
937 "${libdir}/python2.7/Queue.py",
938 "${libdir}/python2.7/_threading_local.py",
939 "${libdir}/python2.7/dummy_thread.py",
940 "${libdir}/python2.7/dummy_threading.py",
941 "${libdir}/python2.7/mutex.py",
942 "${libdir}/python2.7/threading.py"
943 ],
944 "rdepends": [
945 "core"
946 ],
947 "summary": "Python threading & synchronization support"
948 },
949 "tkinter": {
950 "files": [
951 "${libdir}/python2.7/lib-tk"
952 ],
953 "rdepends": [
954 "core"
955 ],
956 "summary": "Python Tcl/Tk bindings"
957 },
958 "unittest": {
959 "files": [
960 "${libdir}/python2.7/unittest"
961 ],
962 "rdepends": [
963 "core",
964 "difflib",
965 "io",
966 "lang",
967 "pprint",
968 "shell"
969 ],
970 "summary": "Python unit testing framework"
971 },
972 "unixadmin": {
973 "files": [
974 "${libdir}/python2.7/getpass.py",
975 "${libdir}/python2.7/lib-dynload/grp.so",
976 "${libdir}/python2.7/lib-dynload/nis.so"
977 ],
978 "rdepends": [
979 "core",
980 "io"
981 ],
982 "summary": "Python Unix administration support"
983 },
984 "xml": {
985 "files": [
986 "${libdir}/python2.7/lib-dynload/_elementtree.so",
987 "${libdir}/python2.7/lib-dynload/pyexpat.so",
988 "${libdir}/python2.7/xml"
989 ],
990 "rdepends": [
991 "core"
992 ],
993 "summary": "Python basic XML support"
994 },
995 "xmlrpc": {
996 "files": [
997 "${libdir}/python2.7/DocXMLRPCServer.py",
998 "${libdir}/python2.7/SimpleXMLRPCServer.py"
999 ],
1000 "rdepends": [
1001 "codecs",
1002 "compression",
1003 "contextlib",
1004 "core",
1005 "crypt",
1006 "datetime",
1007 "fcntl",
1008 "io",
1009 "lang",
1010 "math",
1011 "mime",
1012 "netclient",
1013 "netserver",
1014 "pkgutil",
1015 "pydoc",
1016 "textutils",
1017 "threading",
1018 "xml",
1019 "zlib"
1020 ],
1021 "summary": "Python XML-RPC support"
1022 },
1023 "zlib": {
1024 "files": [
1025 "${libdir}/python2.7/lib-dynload/zlib.so"
1026 ],
1027 "rdepends": [
1028 "core"
1029 ],
1030 "summary": "Python zlib compression support"
1031 }
1032} \ No newline at end of file
diff --git a/meta/recipes-devtools/python/python/sitecustomize.py b/meta/recipes-devtools/python/python/sitecustomize.py
index 273901898a..4c8b5e2ba3 100644
--- a/meta/recipes-devtools/python/python/sitecustomize.py
+++ b/meta/recipes-devtools/python/python/sitecustomize.py
@@ -27,19 +27,11 @@ def __enableReadlineSupport():
27 except IOError: 27 except IOError:
28 pass 28 pass
29 29
30def __enableDefaultEncoding():
31 import sys
32 try:
33 sys.setdefaultencoding( "utf8" )
34 except LookupError:
35 pass
36
37import sys 30import sys
38try: 31try:
39 import rlcompleter, readline 32 import rlcompleter, readline
40except ImportError: 33except ImportError:
41 pass 34 pass
42else: 35else:
43 __enableDefaultEncoding()
44 __registerExitHandler() 36 __registerExitHandler()
45 __enableReadlineSupport() 37 __enableReadlineSupport()
diff --git a/meta/recipes-devtools/python/python_2.7.13.bb b/meta/recipes-devtools/python/python_2.7.13.bb
index 754c029097..dbafb955f9 100644
--- a/meta/recipes-devtools/python/python_2.7.13.bb
+++ b/meta/recipes-devtools/python/python_2.7.13.bb
@@ -1,5 +1,7 @@
1require python.inc 1require python.inc
2
2DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib" 3DEPENDS = "python-native libffi bzip2 gdbm openssl readline sqlite3 zlib"
4
3PR = "${INC_PR}" 5PR = "${INC_PR}"
4 6
5DISTRO_SRC_URI ?= "file://sitecustomize.py" 7DISTRO_SRC_URI ?= "file://sitecustomize.py"
@@ -145,11 +147,9 @@ py_package_preprocess () {
145 python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py 147 python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
146} 148}
147 149
148require python-${PYTHON_MAJMIN}-manifest.inc
149 150
150# manual dependency additions 151# manual dependency additions
151RPROVIDES_${PN}-core = "${PN}" 152RPROVIDES_${PN}-core = "${PN}"
152RRECOMMENDS_${PN}-core = "${PN}-readline"
153RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules" 153RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
154RRECOMMENDS_${PN}-crypt = "openssl" 154RRECOMMENDS_${PN}-crypt = "openssl"
155 155
@@ -193,3 +193,87 @@ FILES_${PN}-man = "${datadir}/man"
193RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}" 193RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', '', '${PN}-bsddb', d)}"
194 194
195BBCLASSEXTEND = "nativesdk" 195BBCLASSEXTEND = "nativesdk"
196
197RPROVIDES_${PN} += "${PN}-modules"
198
199# We want bytecode precompiled .py files (.pyc's) by default
200# but the user may set it on their own conf
201
202INCLUDE_PYCS ?= "1"
203
204python(){
205
206 pythondir = d.getVar('THISDIR',True)
207
208 # Read JSON manifest
209 import json
210 with open(pythondir+'/python/python2-manifest.json') as manifest_file:
211 python_manifest=json.load(manifest_file)
212
213 include_pycs = d.getVar('INCLUDE_PYCS')
214
215 packages = d.getVar('PACKAGES').split()
216 pn = d.getVar('PN')
217
218
219 newpackages=[]
220
221 for key in python_manifest:
222 pypackage= pn + '-' + key
223
224 if pypackage not in packages:
225 # We need to prepend, otherwise python-misc gets everything
226 # so we use a new variable
227 newpackages.append(pypackage)
228
229 # "Build" python's manifest FILES, RDEPENDS and SUMMARY
230 d.setVar('FILES_' + pypackage, '')
231 for value in python_manifest[key]['files']:
232 d.appendVar('FILES_' + pypackage, ' ' + value)
233 if include_pycs == '1':
234 if value.endswith('.py'):
235 d.appendVar('FILES_' + pypackage, ' ' + value + 'c')
236
237 d.setVar('RDEPENDS_' + pypackage, '')
238 for value in python_manifest[key]['rdepends']:
239 # Make it work with or without $PN
240 if '${PN}' in value:
241 value=value.split('-')[1]
242 d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
243 d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
244
245 # We need to ensure staticdev packages match for files first so we sort in reverse
246 newpackages.sort(reverse=True)
247 # Prepending so to avoid python-misc getting everything
248 packages = newpackages + packages
249 d.setVar('PACKAGES', ' '.join(packages))
250 d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
251}
252
253do_split_packages[file-checksums] += "${THISDIR}/python/python2-manifest.json:True"
254
255# Files needed to create a new manifest
256SRC_URI += "file://create_manifest2.py file://get_module_deps2.py file://python2-manifest.json"
257
258do_create_manifest() {
259
260# This task should be run with every new release of Python.
261# We must ensure that PACKAGECONFIG enables everything when creating
262# a new manifest, this is to base our new manifest on a complete
263# native python build, containing all dependencies, otherwise the task
264# wont be able to find the required files.
265# e.g. BerkeleyDB is an optional build dependency so it may or may not
266# be present, we must ensure it is.
267
268cd ${WORKDIR}
269# This needs to be executed by python-native and NOT by HOST's python
270nativepython create_manifest2.py
271cp python2-manifest.json.new ${THISDIR}/python/python2-manifest.json
272}
273
274# bitbake python -c create_manifest
275addtask do_create_manifest
276
277# Make sure we have native python ready when we create a new manifest
278do_create_manifest[depends] += "python:do_prepare_recipe_sysroot"
279do_create_manifest[depends] += "python:do_patch"