Skip to contentSkip to conversation

Python3 sqlite does not work

PATCH Fabian Sturm 1 participant 1 message Sep 24, 2018

lore
Share & tools
lore
#0 lore raw

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.

(quoted diff) +0 -0

b/meta/recipes-devtools/python/python3/python3-manifest.json index 2491f36..607eb2b 100644

meta/recipes-devtools/python/python3/python3-manifest.json +0 -0
@@ -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