summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3_3.5.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3_3.5.3.bb')
-rw-r--r--meta/recipes-devtools/python/python3_3.5.3.bb45
1 files changed, 21 insertions, 24 deletions
diff --git a/meta/recipes-devtools/python/python3_3.5.3.bb b/meta/recipes-devtools/python/python3_3.5.3.bb
index 970ba63445..3ae0db2b8b 100644
--- a/meta/recipes-devtools/python/python3_3.5.3.bb
+++ b/meta/recipes-devtools/python/python3_3.5.3.bb
@@ -228,21 +228,22 @@ FILES_${PN}-man = "${datadir}/man"
228BBCLASSEXTEND = "nativesdk" 228BBCLASSEXTEND = "nativesdk"
229 229
230RPROVIDES_${PN} += "${PN}-modules" 230RPROVIDES_${PN} += "${PN}-modules"
231 231
232# We want bytecode precompiled .py files (.pyc's) by default 232# We want bytecode precompiled .py files (.pyc's) by default
233# but the user may set it on their own conf 233# but the user may set it on their own conf
234
235INCLUDE_PYCS ?= "1" 234INCLUDE_PYCS ?= "1"
236 235
237python(){ 236python(){
237 import json
238 238
239 pythondir = d.getVar('THISDIR',True) 239 filename = os.path.join(d.getVar('THISDIR'), 'python3', 'python3-manifest.json')
240 # This python changes the datastore based on the contents of a file, so mark
241 # that dependency.
242 bb.parse.mark_dependency(d, filename)
240 243
241 # Read JSON manifest 244 with open(filename) as manifest_file:
242 import json
243 with open(pythondir+'/python3/python3-manifest.json') as manifest_file:
244 python_manifest=json.load(manifest_file) 245 python_manifest=json.load(manifest_file)
245 246
246 include_pycs = d.getVar('INCLUDE_PYCS') 247 include_pycs = d.getVar('INCLUDE_PYCS')
247 248
248 packages = d.getVar('PACKAGES').split() 249 packages = d.getVar('PACKAGES').split()
@@ -282,28 +283,24 @@ python(){
282 d.setVar('PACKAGES', ' '.join(packages)) 283 d.setVar('PACKAGES', ' '.join(packages))
283 d.setVar('ALLOW_EMPTY_${PN}-modules', '1') 284 d.setVar('ALLOW_EMPTY_${PN}-modules', '1')
284} 285}
285do_split_packages[file-checksums] += "${THISDIR}/python/python3-manifest.json:True"
286
287
288 286
289# Files needed to create a new manifest 287# Files needed to create a new manifest
290SRC_URI += "file://create_manifest3.py file://get_module_deps3.py file://python3-manifest.json" 288SRC_URI += "file://create_manifest3.py file://get_module_deps3.py file://python3-manifest.json"
291 289
292do_create_manifest() { 290do_create_manifest() {
293 291 # This task should be run with every new release of Python.
294# This task should be run with every new release of Python. 292 # We must ensure that PACKAGECONFIG enables everything when creating
295# We must ensure that PACKAGECONFIG enables everything when creating 293 # a new manifest, this is to base our new manifest on a complete
296# a new manifest, this is to base our new manifest on a complete 294 # native python build, containing all dependencies, otherwise the task
297# native python build, containing all dependencies, otherwise the task 295 # wont be able to find the required files.
298# wont be able to find the required files. 296 # e.g. BerkeleyDB is an optional build dependency so it may or may not
299# e.g. BerkeleyDB is an optional build dependency so it may or may not 297 # be present, we must ensure it is.
300# be present, we must ensure it is. 298
301 299 cd ${WORKDIR}
302cd ${WORKDIR} 300 # This needs to be executed by python-native and NOT by HOST's python
303# This needs to be executed by python-native and NOT by HOST's python 301 nativepython3 create_manifest3.py
304nativepython3 create_manifest3.py 302 cp python3-manifest.json.new ${THISDIR}/python3/python3-manifest.json
305cp python3-manifest.json.new ${THISDIR}/python3/python3-manifest.json 303}
306}
307 304
308# bitbake python -c create_manifest 305# bitbake python -c create_manifest
309addtask do_create_manifest 306addtask do_create_manifest