From 6c524c09067a57c6e78e41a3860387dd4b31dc2b Mon Sep 17 00:00:00 2001 From: Alejandro Enedino Hernandez Samaniego Date: Fri, 16 Nov 2018 11:31:45 -0800 Subject: 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-devtools/python/python3_3.5.6.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/recipes-devtools/python/python3_3.5.6.bb') 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(){ bb.parse.mark_dependency(d, filename) with open(filename) as manifest_file: - python_manifest=json.load(manifest_file, object_pairs_hook=collections.OrderedDict) + 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, object_pairs_hook=collections.OrderedDict) include_pycs = d.getVar('INCLUDE_PYCS') -- cgit v1.2.3-54-g00ecf