From 3050a4c634da74eba53380bf23de515ed651bc03 Mon Sep 17 00:00:00 2001 From: Alejandro Enedino Hernandez Samaniego Date: Fri, 16 Nov 2018 11:31:46 -0800 Subject: 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster --- meta/recipes-devtools/python/python-native_2.7.15.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/recipes-devtools/python/python-native_2.7.15.bb') 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(){ import json pythondir = d.getVar('THISDIR',True) with open(pythondir+'/python/python2-manifest.json') as manifest_file: - python_manifest=json.load(manifest_file) + manifest_str = manifest_file.read() + json_start = manifest_str.find('# EOC') + 6 + manifest_file.seek(json_start) + manifest_str = manifest_file.read() + python_manifest = json.loads(manifest_str) rprovides = d.getVar('RPROVIDES').split() -- cgit v1.2.3