[yocto] Python3 sqlite does not work

Fabian Sturm f at rtfs.org
Mon Sep 24 13:08:47 PDT 2018


Hi, 

I added python3 to my yocto build and it seems python-sqlite3 is not
working due to a missing file. If I change python3-manifest.json from
here:

  http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devt
ools/python/python3/python3-manifest.json?h=sumo

to also include the __init__.py file. Them it seems to be woking fine.


diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json 
b/meta/recipes-devtools/python/python3/python3-manifest.json
index 2491f36..607eb2b 100644
--- a/meta/recipes-devtools/python/python3/python3-manifest.json
+++ b/meta/recipes-devtools/python/python3/python3-manifest.json
@@ -979,12 +979,14 @@
         "cached": [
             "${libdir}/python3.5/sqlite3/__pycache__",
             "${libdir}/python3.5/sqlite3/__pycache__/dbapi2.*.pyc",
-            "${libdir}/python3.5/sqlite3/__pycache__/dump.*.pyc"
+            "${libdir}/python3.5/sqlite3/__pycache__/dump.*.pyc",
+            "${libdir}/python3.5/sqlite3/__pycache__/__init__.pyc"
         ],
         "files": [
             "${libdir}/python3.5/lib-dynload/_sqlite3.*.so",
             "${libdir}/python3.5/sqlite3/dbapi2.py",
-            "${libdir}/python3.5/sqlite3/dump.py"
+            "${libdir}/python3.5/sqlite3/dump.py",
+            "${libdir}/python3.5/sqlite3/__init__.py"
         ],

To test it it is enough to run python3 and do:

  import sqlite3
  help(sqlite3)

You should see many functions like e.g. connect instead of only two.

Is this a bug, or am I doing something wrong?

Kind regards,
Fabian



More information about the yocto mailing list