diff options
Diffstat (limited to 'meta/recipes-devtools/python/python/create_manifest2.py')
-rw-r--r-- | meta/recipes-devtools/python/python/create_manifest2.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/meta/recipes-devtools/python/python/create_manifest2.py b/meta/recipes-devtools/python/python/create_manifest2.py index e7450452ba..1af1443f47 100644 --- a/meta/recipes-devtools/python/python/create_manifest2.py +++ b/meta/recipes-devtools/python/python/create_manifest2.py | |||
@@ -37,6 +37,7 @@ import sys | |||
37 | import subprocess | 37 | import subprocess |
38 | import json | 38 | import json |
39 | import os | 39 | import os |
40 | import collections | ||
40 | 41 | ||
41 | # Hack to get native python search path (for folders), not fond of it but it works for now | 42 | # Hack to get native python search path (for folders), not fond of it but it works for now |
42 | pivot='recipe-sysroot-native' | 43 | pivot='recipe-sysroot-native' |
@@ -45,7 +46,7 @@ for p in sys.path: | |||
45 | nativelibfolder=p[:p.find(pivot)+len(pivot)] | 46 | nativelibfolder=p[:p.find(pivot)+len(pivot)] |
46 | 47 | ||
47 | # Empty dict to hold the whole manifest | 48 | # Empty dict to hold the whole manifest |
48 | new_manifest = {} | 49 | new_manifest = collections.OrderedDict() |
49 | 50 | ||
50 | # Check for repeated files, folders and wildcards | 51 | # Check for repeated files, folders and wildcards |
51 | allfiles=[] | 52 | allfiles=[] |
@@ -63,7 +64,7 @@ def isFolder(value): | |||
63 | 64 | ||
64 | # Read existing JSON manifest | 65 | # Read existing JSON manifest |
65 | with open('python2-manifest.json') as manifest: | 66 | with open('python2-manifest.json') as manifest: |
66 | old_manifest=json.load(manifest) | 67 | old_manifest = json.load(manifest, object_pairs_hook=collections.OrderedDict) |
67 | 68 | ||
68 | 69 | ||
69 | # First pass to get core-package functionality, because we base everything on the fact that core is actually working | 70 | # First pass to get core-package functionality, because we base everything on the fact that core is actually working |
@@ -124,13 +125,14 @@ for key in old_manifest: | |||
124 | 125 | ||
125 | for key in old_manifest: | 126 | for key in old_manifest: |
126 | # Use an empty dict as data structure to hold data for each package and fill it up | 127 | # Use an empty dict as data structure to hold data for each package and fill it up |
127 | new_manifest[key]={} | 128 | new_manifest[key] = collections.OrderedDict() |
128 | new_manifest[key]['files']=[] | 129 | new_manifest[key]['summary'] = old_manifest[key]['summary'] |
129 | new_manifest[key]['rdepends']=[] | 130 | new_manifest[key]['rdepends']=[] |
131 | new_manifest[key]['files'] = [] | ||
132 | |||
130 | # All packages should depend on core | 133 | # All packages should depend on core |
131 | if key != 'core': | 134 | if key != 'core': |
132 | new_manifest[key]['rdepends'].append('core') | 135 | new_manifest[key]['rdepends'].append('core') |
133 | new_manifest[key]['summary']=old_manifest[key]['summary'] | ||
134 | 136 | ||
135 | # Handle special cases, we assume that when they were manually added | 137 | # Handle special cases, we assume that when they were manually added |
136 | # to the manifest we knew what we were doing. | 138 | # to the manifest we knew what we were doing. |
@@ -274,4 +276,4 @@ for key in new_manifest: | |||
274 | 276 | ||
275 | # Create the manifest from the data structure that was built | 277 | # Create the manifest from the data structure that was built |
276 | with open('python2-manifest.json.new','w') as outfile: | 278 | with open('python2-manifest.json.new','w') as outfile: |
277 | json.dump(new_manifest,outfile,sort_keys=True, indent=4, separators=(',', ': ')) | 279 | json.dump(new_manifest,outfile, indent=4) |