summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/python/python3/get_module_deps3.py20
-rw-r--r--meta/recipes-devtools/python/python3/python3-manifest.json2
2 files changed, 19 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python3/get_module_deps3.py b/meta/recipes-devtools/python/python3/get_module_deps3.py
index fd12baad84..6806f23172 100644
--- a/meta/recipes-devtools/python/python3/get_module_deps3.py
+++ b/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -9,6 +9,7 @@
9debug=False 9debug=False
10 10
11import sys 11import sys
12import os
12 13
13# We can get a list of the modules which are currently required to run python 14# We can get a list of the modules which are currently required to run python
14# so we run python-core and get its modules, we then import what we need 15# so we run python-core and get its modules, we then import what we need
@@ -48,8 +49,19 @@ current_module = str(sys.argv[1]).rstrip()
48if(debug==True): 49if(debug==True):
49 log = open('log_%s' % current_module,'w') 50 log = open('log_%s' % current_module,'w')
50 log.write('Module %s generated the following dependencies:\n' % current_module) 51 log.write('Module %s generated the following dependencies:\n' % current_module)
51try: 52try:
52 importlib.import_module('%s' % current_module) 53 m = importlib.import_module(current_module)
54 # handle python packages which may not include all modules in the __init__
55 if os.path.basename(m.__file__) == "__init__.py":
56 modulepath = os.path.dirname(m.__file__)
57 for i in os.listdir(modulepath):
58 if i.startswith("_") or not(i.endswith(".py")):
59 continue
60 submodule = "{}.{}".format(current_module, i[:-3])
61 try:
62 importlib.import_module(submodule)
63 except:
64 pass # ignore all import or other exceptions raised during import
53except ImportError as e: 65except ImportError as e:
54 if (debug==True): 66 if (debug==True):
55 log.write('Module was not found') 67 log.write('Module was not found')
@@ -107,6 +119,8 @@ for item in dif:
107 dep_path = dep_path.replace(soabi,'*') 119 dep_path = dep_path.replace(soabi,'*')
108 print (dep_path) 120 print (dep_path)
109 continue 121 continue
122 if "_sysconfigdata" in dep_path:
123 dep_path = dep_path.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
110 124
111 if (debug==True): 125 if (debug==True):
112 log.write(dep_path+'\n') 126 log.write(dep_path+'\n')
@@ -140,6 +154,8 @@ for item in dif:
140 log.write(cached) 154 log.write(cached)
141 cached = fix_path(cached) 155 cached = fix_path(cached)
142 cached = cached.replace(cpython_tag,'*') 156 cached = cached.replace(cpython_tag,'*')
157 if "_sysconfigdata" in cached:
158 cached = cached.replace(sysconfig._get_sysconfigdata_name(), "_sysconfigdata*")
143 print (cached) 159 print (cached)
144 160
145if debug==True: 161if debug==True:
diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json
index 3bcc9b8662..07b084d48c 100644
--- a/meta/recipes-devtools/python/python3/python3-manifest.json
+++ b/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -324,7 +324,7 @@
324 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc", 324 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc",
325 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_markupbase.*.pyc", 325 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_markupbase.*.pyc",
326 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sitebuiltins.*.pyc", 326 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sitebuiltins.*.pyc",
327 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata.*.pyc", 327 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata*.*.pyc",
328 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_weakrefset.*.pyc", 328 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_weakrefset.*.pyc",
329 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/abc.*.pyc", 329 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/abc.*.pyc",
330 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/argparse.*.pyc", 330 "${libdir}/python${PYTHON_MAJMIN}/__pycache__/argparse.*.pyc",