Skip to contentSkip to conversation

python3: move sqlite files into python-sqlite

PATCH In review Ross Burton 2 participants 4 messages Sep 28, 2018 – Sep 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 python3: move sqlite files into python-sqlite

sqlite3/__init__.py was accidentally included in python3-misc.

---
 meta/recipes-devtools/python/python3/python3-manifest.json | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +2 -7
index 539b7967b59..f922561368d 100644
@@ -994,14 +994,9 @@
         ],
         "files": [
             "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sqlite3.*.so",
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/dbapi2.py",
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/dump.py"
+            "${libdir}/python${PYTHON_MAJMIN}/sqlite3"
         ],
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/__pycache__",
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/__pycache__/dbapi2.*.pyc",
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/__pycache__/dump.*.pyc"
-        ]
+        "cached": []
     },
     "stringold": {
         "summary": "Python string APIs [deprecated]",
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/3 python: mark the tests modules as special when updating the manifest

We manually maintain the tests package's content and dependencies, so mark is as special (matching create_manifest3.py).

---
 meta/recipes-devtools/python/python/create_manifest2.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python/create_manifest2.py +1 -1
index 1af1443f476..87999991d73 100644
@@ -137,7 +137,7 @@ for key in old_manifest:
     # Handle special cases, we assume that when they were manually added 
     # to the manifest we knew what we were doing.
     print ('Handling package %s' % key)
-    special_packages=['misc', 'modules', 'dev']
+    special_packages=['misc', 'modules', 'tests', 'dev']
     if key in special_packages or 'staticdev' in key:
         print('Passing %s package directly' % key)
         new_manifest[key]=old_manifest[key]
Signature · 1 line
2.11.0
#2 lore raw

PATCH 3/3 python: move sqlite module into python-sqlite

In reply to Ross Burton

The module was accidentally included in python-misc.

Also re-run create_manifest to update the dependencies of python-sqlite3, causing some whitespace changes.

[ YOCTO #12933 ]

---
 .../python/python/python2-manifest.json            | 24 ++++++++++++----------
 1 file changed, 13 insertions(+), 11 deletions(-)
meta/recipes-devtools/python/python/python2-manifest.json +13 -11
index 1e7004e05ea..260fa6f80d2 100644
@@ -1,18 +1,18 @@
 {
     "tests": {
-        "summary": "Python test suite",
+        "summary": "Python test suite", 
         "rdepends": [
-            "core",
+            "core", 
             "modules"
-        ],
+        ], 
         "files": [
-            "${libdir}/python2.7/*/test",
-            "${libdir}/python2.7/*/tests",
-            "${libdir}/python2.7/idlelib/idle_test/",
+            "${libdir}/python2.7/*/test", 
+            "${libdir}/python2.7/*/tests", 
+            "${libdir}/python2.7/idlelib/idle_test/", 
             "${libdir}/python2.7/test"
-        ],
+        ], 
         "cached": []
-    },
+    }, 
     "2to3": {
         "summary": "Python automated Python 2 to 3 code translator", 
         "rdepends": [
@@ -881,10 +881,12 @@
     "sqlite3": {
         "summary": "Python Sqlite3 database support", 
         "rdepends": [
-            "core"
+            "core", 
+            "datetime"
         ], 
         "files": [
-            "${libdir}/python2.7/lib-dynload/_sqlite3.so"
+            "${libdir}/python2.7/lib-dynload/_sqlite3.so", 
+            "${libdir}/python2.7/sqlite3"
         ]
     }, 
     "stringold": {
@@ -1041,4 +1043,4 @@
             "${libdir}/python2.7/lib-dynload/zlib.so"
         ]
     }
-}
+}
\ No newline at end of file
Signature · 1 line
2.11.0
#3 lore raw
In reply to Ross Burton

Thanks Ross,

build tested this and:

packages-split/python-sqlite3/usr/lib/python2.7/sqlite3/ now contains __init__.py

test end up here:
packages-split/python-tests/usr/lib/python2.7/sqlite3/test/

So solved afaiac,

Regards,
Jeroen

Quoted 28 lines · Ross Burton

sqlite3/__init__.py was accidentally included in python3-misc.

---
  meta/recipes-devtools/python/python3/python3-manifest.json | 9 ++-------
  1 file changed, 2 insertions(+), 7 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +2 -7
index 539b7967b59..f922561368d 100644
@@ -994,14 +994,9 @@
          ],
          "files": [
              "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_sqlite3.*.so",
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/dbapi2.py",
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/dump.py"
+            "${libdir}/python${PYTHON_MAJMIN}/sqlite3"
          ],
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/__pycache__",
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/__pycache__/dbapi2.*.pyc",
-            "${libdir}/python${PYTHON_MAJMIN}/sqlite3/__pycache__/dump.*.pyc"
-        ]
+        "cached": []
      },
      "stringold": {
          "summary": "Python string APIs [deprecated]",