summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3_3.5.6.bb
diff options
context:
space:
mode:
authorAlejandro Enedino Hernandez Samaniego <alejandro.enedino.hernandez-samaniego@xilinx.com>2018-11-16 11:31:45 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-01 11:38:37 +0000
commit6c524c09067a57c6e78e41a3860387dd4b31dc2b (patch)
treebf24aaa5b511179ea6edbd8d8840c00c946e624b /meta/recipes-devtools/python/python3_3.5.6.bb
parenta1e2c4e9bde9af41d797a2d0b7e4a3448c47bd64 (diff)
downloadpoky-6c524c09067a57c6e78e41a3860387dd4b31dc2b.tar.gz
python3: 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: 3eab24c6dc095fd2305b9be8467aab1191141e35) 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/python3_3.5.6.bb')
-rw-r--r--meta/recipes-devtools/python/python3_3.5.6.bb6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python3_3.5.6.bb b/meta/recipes-devtools/python/python3_3.5.6.bb
index 25c47b6192..430c577785 100644
--- a/meta/recipes-devtools/python/python3_3.5.6.bb
+++ b/meta/recipes-devtools/python/python3_3.5.6.bb
@@ -265,7 +265,11 @@ python(){
265 bb.parse.mark_dependency(d, filename) 265 bb.parse.mark_dependency(d, filename)
266 266
267 with open(filename) as manifest_file: 267 with open(filename) as manifest_file:
268 python_manifest=json.load(manifest_file, object_pairs_hook=collections.OrderedDict) 268 manifest_str = manifest_file.read()
269 json_start = manifest_str.find('# EOC') + 6
270 manifest_file.seek(json_start)
271 manifest_str = manifest_file.read()
272 python_manifest = json.loads(manifest_str, object_pairs_hook=collections.OrderedDict)
269 273
270 include_pycs = d.getVar('INCLUDE_PYCS') 274 include_pycs = d.getVar('INCLUDE_PYCS')
271 275