summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python_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_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_2.7.15.bb')
-rw-r--r--meta/recipes-devtools/python/python_2.7.15.bb6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.15.bb b/meta/recipes-devtools/python/python_2.7.15.bb
index 6a60aa7f5b..7a6da884e5 100644
--- a/meta/recipes-devtools/python/python_2.7.15.bb
+++ b/meta/recipes-devtools/python/python_2.7.15.bb
@@ -199,7 +199,11 @@ python(){
199 bb.parse.mark_dependency(d, filename) 199 bb.parse.mark_dependency(d, filename)
200 200
201 with open(filename) as manifest_file: 201 with open(filename) as manifest_file:
202 python_manifest=json.load(manifest_file, object_pairs_hook=collections.OrderedDict) 202 manifest_str = manifest_file.read()
203 json_start = manifest_str.find('# EOC') + 6
204 manifest_file.seek(json_start)
205 manifest_str = manifest_file.read()
206 python_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
203 207
204 include_pycs = d.getVar('INCLUDE_PYCS') 208 include_pycs = d.getVar('INCLUDE_PYCS')
205 209