summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-native_2.7.15.bb
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandro.enedino.hernandez-samaniego@xilinx.com>2018-11-16 11:31:46 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-01 11:38:37 +0000
commit8627773268fdb58711ef23cc5d54274cc82052b8 (patch)
treedb88c04ec89307707328779d48c60c4b99951000 /meta/recipes-devtools/python/python-native_2.7.15.bb
parent6c524c09067a57c6e78e41a3860387dd4b31dc2b (diff)
downloadpoky-8627773268fdb58711ef23cc5d54274cc82052b8.tar.gz
python: Adds instructions to the manifest file
While there is a bit of documentation regarding building a new manifest file for python, it seems that users usually only read the manifest file. The manifest file is in JSON format which doesn't allow comments, hence why instructions were initially put elsewhere. This patch hacks the call to open the JSON manifest file by using a marker to trick it into reading only part of the file as the manifest itself, and keep the other part as comments, which contain instructions for the user to run the create_manifest task after an upgrade or when adding a new package. (From OE-Core rev: 5641a24a70b54544012c04c6a082514d9a5aa49a) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.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/python/python-native_2.7.15.bb')
-rw-r--r--meta/recipes-devtools/python/python-native_2.7.15.bb6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.15.bb b/meta/recipes-devtools/python/python-native_2.7.15.bb
index 7c491fa3e0..de35104c60 100644
--- a/meta/recipes-devtools/python/python-native_2.7.15.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.15.bb
@@ -69,7 +69,11 @@ python(){
69 import json 69 import json
70 pythondir = d.getVar('THISDIR',True) 70 pythondir = d.getVar('THISDIR',True)
71 with open(pythondir+'/python/python2-manifest.json') as manifest_file: 71 with open(pythondir+'/python/python2-manifest.json') as manifest_file:
72 python_manifest=json.load(manifest_file) 72 manifest_str = manifest_file.read()
73 json_start = manifest_str.find('# EOC') + 6
74 manifest_file.seek(json_start)
75 manifest_str = manifest_file.read()
76 python_manifest = json.loads(manifest_str)
73 77
74 rprovides = d.getVar('RPROVIDES').split() 78 rprovides = d.getVar('RPROVIDES').split()
75 79