diff options
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/python/python3/create_manifest3.py | 43 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3/python3-manifest.json | 15 |
2 files changed, 37 insertions, 21 deletions
diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py index 43e95ce96b..212ddd434a 100644 --- a/meta/recipes-devtools/python/python3/create_manifest3.py +++ b/meta/recipes-devtools/python/python3/create_manifest3.py | |||
@@ -124,7 +124,6 @@ for value in old_manifest['core']['files']: | |||
124 | # Get module name , shouldnt be affected by libdir/bindir | 124 | # Get module name , shouldnt be affected by libdir/bindir |
125 | value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0] | 125 | value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0] |
126 | 126 | ||
127 | |||
128 | # Launch separate task for each module for deterministic behavior | 127 | # Launch separate task for each module for deterministic behavior |
129 | # Each module will only import what is necessary for it to work in specific | 128 | # Each module will only import what is necessary for it to work in specific |
130 | print ('Getting dependencies for module: %s' % value) | 129 | print ('Getting dependencies for module: %s' % value) |
@@ -203,8 +202,20 @@ for key in old_manifest: | |||
203 | if value not in new_manifest[key]['files']: | 202 | if value not in new_manifest[key]['files']: |
204 | new_manifest[key]['files'].append(value) | 203 | new_manifest[key]['files'].append(value) |
205 | continue | 204 | continue |
205 | |||
206 | # Get module name , shouldnt be affected by libdir/bindir | 206 | # Get module name , shouldnt be affected by libdir/bindir |
207 | value = os.path.splitext(os.path.basename(os.path.normpath(value)))[0] | 207 | # We need to check if the imported module comes from another (e.g. sqlite3.dump) |
208 | path,value = os.path.split(value) | ||
209 | path = os.path.basename(path) | ||
210 | value = os.path.splitext(os.path.basename(value))[0] | ||
211 | |||
212 | # If this condition is met, it means we need to import it from another module | ||
213 | # or its the folder itself (e.g. unittest) | ||
214 | if path == key: | ||
215 | if value: | ||
216 | value = path + '.' + value | ||
217 | else: | ||
218 | value = path | ||
208 | 219 | ||
209 | # Launch separate task for each module for deterministic behavior | 220 | # Launch separate task for each module for deterministic behavior |
210 | # Each module will only import what is necessary for it to work in specific | 221 | # Each module will only import what is necessary for it to work in specific |
@@ -292,19 +303,20 @@ for key in old_manifest: | |||
292 | new_manifest[key]['rdepends'].append(newkey) | 303 | new_manifest[key]['rdepends'].append(newkey) |
293 | break | 304 | break |
294 | else: | 305 | else: |
295 | # Debug | 306 | # A module shouldn't contain itself (${libdir}/python3/sqlite3 shouldnt be on sqlite3 files) |
296 | print('Adding %s to %s FILES' % (item, key)) | 307 | if os.path.basename(item) != key: |
297 | # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package | 308 | print('Adding %s to %s FILES' % (item, key)) |
298 | if isCached(item): | 309 | # Since it wasnt found on another package, its not an RDEP, so add it to FILES for this package |
299 | new_manifest[key]['cached'].append(item) | 310 | if isCached(item): |
300 | else: | 311 | new_manifest[key]['cached'].append(item) |
301 | new_manifest[key]['files'].append(item) | 312 | else: |
302 | if item.endswith('*'): | 313 | new_manifest[key]['files'].append(item) |
303 | wildcards.append(item) | 314 | if item.endswith('*'): |
304 | if item not in allfiles: | 315 | wildcards.append(item) |
305 | allfiles.append(item) | 316 | if item not in allfiles: |
306 | else: | 317 | allfiles.append(item) |
307 | repeated.append(item) | 318 | else: |
319 | repeated.append(item) | ||
308 | 320 | ||
309 | print ('The following files are repeated (contained in more than one package), please check which package should get it:') | 321 | print ('The following files are repeated (contained in more than one package), please check which package should get it:') |
310 | print (repeated) | 322 | print (repeated) |
@@ -322,3 +334,4 @@ for key in new_manifest: | |||
322 | # Create the manifest from the data structure that was built | 334 | # Create the manifest from the data structure that was built |
323 | with open('python3-manifest.json.new','w') as outfile: | 335 | with open('python3-manifest.json.new','w') as outfile: |
324 | json.dump(new_manifest,outfile,sort_keys=True, indent=4) | 336 | json.dump(new_manifest,outfile,sort_keys=True, indent=4) |
337 | outfile.write("\n") | ||
diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json index 911be8e971..26fa613eff 100644 --- a/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/meta/recipes-devtools/python/python3/python3-manifest.json | |||
@@ -591,8 +591,7 @@ | |||
591 | ], | 591 | ], |
592 | "rdepends": [ | 592 | "rdepends": [ |
593 | "core", | 593 | "core", |
594 | "stringold", | 594 | "stringold" |
595 | "netserver" | ||
596 | ], | 595 | ], |
597 | "summary": "Python logging support" | 596 | "summary": "Python logging support" |
598 | }, | 597 | }, |
@@ -978,14 +977,18 @@ | |||
978 | }, | 977 | }, |
979 | "sqlite3": { | 978 | "sqlite3": { |
980 | "cached": [ | 979 | "cached": [ |
981 | "${libdir}/python3.5/sqlite3/__pycache__/*.pyc" | 980 | "${libdir}/python3.5/sqlite3/__pycache__", |
981 | "${libdir}/python3.5/sqlite3/__pycache__/dbapi2.*.pyc", | ||
982 | "${libdir}/python3.5/sqlite3/__pycache__/dump.*.pyc" | ||
982 | ], | 983 | ], |
983 | "files": [ | 984 | "files": [ |
984 | "${libdir}/python3.5/lib-dynload/_sqlite3.*.so", | 985 | "${libdir}/python3.5/lib-dynload/_sqlite3.*.so", |
985 | "${libdir}/python3.5/sqlite3/*.py" | 986 | "${libdir}/python3.5/sqlite3/dbapi2.py", |
987 | "${libdir}/python3.5/sqlite3/dump.py" | ||
986 | ], | 988 | ], |
987 | "rdepends": [ | 989 | "rdepends": [ |
988 | "core" | 990 | "core", |
991 | "datetime" | ||
989 | ], | 992 | ], |
990 | "summary": "Python Sqlite3 database support" | 993 | "summary": "Python Sqlite3 database support" |
991 | }, | 994 | }, |
@@ -1145,4 +1148,4 @@ | |||
1145 | ], | 1148 | ], |
1146 | "summary": "Python XML-RPC support" | 1149 | "summary": "Python XML-RPC support" |
1147 | } | 1150 | } |
1148 | } | 1151 | } \ No newline at end of file |