Skip to contentSkip to conversation

python3: add missing pyc files to core

PATCH New Tafil Avdyli 1 participant 2 messages Aug 18

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 python3: add missing pyc files to core

Recently _ast_unparse, _py_warnings and annotationlib were added to core. The corresponding .pyc files were omitted, resulting them to be generated on the target.

Fixes 01982411b5cc ("python3: add _py_warnings, annotationlib to core")
Fixes 9dfe1e7722fc ("python3: add _ast_unparse to core")
(cherry picked from commit 300a0ba0bc96b66be63f8c4324342ed1a9ef3c73)
---
 meta/recipes-devtools/python/python3/python3-manifest.json | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/python/python3/python3-manifest.json +3 -0
index 11ce2c97d2..5d46e4e8b9 100644
@@ -324,16 +324,19 @@
         ],
         "cached": [
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/__future__.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_ast_unparse.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_bootlocale.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_collections_abc.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_colorize.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_compression.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_markupbase.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_opcode_metadata.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_py_warnings.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sitebuiltins.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_sysconfigdata*.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/_weakrefset.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/abc.*.pyc",
+            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/annotationlib.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/argparse.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/ast.*.pyc",
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/bisect.*.pyc",
#1 lore raw

PATCH 2/2 python3: fix stringold cache files

In the 3.14.0 upgrade the stringold package updated to the string module directory but did not update the cache files. This resulted on targets to generate string/__pycache__/__init__.cpython-314.pyc.

The packaging of the cache files can be only separated with a manual edit but breaks do_create_manifest. Instead follow other packages and bundle string/__pycache__ in files.

Fixes 56318067ab3e ("python3: upgrade 3.13.11 -> 3.14.0")
(cherry picked from commit 90e44d557d9897bd5c73018825d74eb338273b58)
---
 .../recipes-devtools/python/python3/python3-manifest.json | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +3 -5
index 5d46e4e8b9..008d41e565 100644
@@ -1047,12 +1047,10 @@
             "core"
         ],
         "files": [
-            "${libdir}/python${PYTHON_MAJMIN}/string/__init__.py",
-            "${libdir}/python${PYTHON_MAJMIN}/string/templatelib.py"
+            "${libdir}/python${PYTHON_MAJMIN}/string",
+            "${libdir}/python${PYTHON_MAJMIN}/string/__pycache__"
         ],
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/__pycache__/string.*.pyc"
-        ]
+        "cached": []
     },
     "syslog": {
         "summary": "Python syslog interface",