Skip to contentSkip to conversation

python3: remove empty python3-distutils-staticdev

PATCH New Ross Burton 1 participant 3 messages Jul 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 python3: remove empty python3-distutils-staticdev

distutils doesn't ship any static libraries, and the files this should pick up do not exist. Copy/paste gone wrong maybe?

---
 .../python/python3/python3-manifest.json             | 12 ------------
 1 file changed, 12 deletions(-)
meta/recipes-devtools/python/python3/python3-manifest.json +0 -12
index 0803ac00334..b179215838a 100644
@@ -512,18 +512,6 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc"
         ]
     },
-    "distutils-staticdev": {
-        "cached": [
-            "${libdir}/python${PYTHON_MAJMIN}/config/__pycache__/lib*.a"
-        ],
-        "files": [
-            "${libdir}/python${PYTHON_MAJMIN}/config/lib*.a"
-        ],
-        "rdepends": [
-            "distutils"
-        ],
-        "summary": "Python distribution utilities (static libraries)"
-    },
     "distutils": {
         "summary": "Python Distribution Utilities",
         "rdepends": [
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/3 python3: support recommends in manifest

Add support for runtime recommends along with runtime depends to the manifest.

---
 meta/recipes-devtools/python/python3_3.7.4.bb | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
meta/recipes-devtools/python/python3_3.7.4.bb +8 -2
index a63abfd6cb2..59d70249880 100644
@@ -229,7 +229,7 @@ python(){
 
     newpackages=[]
     for key in python_manifest:
-        pypackage= pn + '-' + key
+        pypackage = pn + '-' + key
 
         if pypackage not in packages:
             # We need to prepend, otherwise python-misc gets everything
@@ -249,8 +249,14 @@ python(){
         for value in python_manifest[key]['rdepends']:
             # Make it work with or without $PN
             if '${PN}' in value:
-                value=value.split('-')[1]
+                value=value.split('-', 1)[1]
             d.appendVar('RDEPENDS_' + pypackage, ' ' + pn + '-' + value)
+
+        for value in python_manifest[key].get('rrecommends', ()):
+            if '${PN}' in value:
+                value=value.split('-', 1)[1]
+            d.appendVar('RRECOMMENDS_' + pypackage, ' ' + pn + '-' + value)
+
         d.setVar('SUMMARY_' + pypackage, python_manifest[key]['summary'])
 
     # Prepending so to avoid python-misc getting everything
Signature · 1 line
2.20.1
#2 lore raw

PATCH 3/3 python3: split out the Windows distutils installer stubs

In reply to Ross Burton

Needing the Windows distutils installer stubs is quite a niche requirement, so put them into a separate package and just recommend it.

This can save both space and legal pain, as the installers embed an old zlib that has known CVEs.

---
 .../python/python3/python3-manifest.json            | 13 +++++++++++++
 1 file changed, 13 insertions(+)
meta/recipes-devtools/python/python3/python3-manifest.json +13 -0
index b179215838a..ec28c2dbb45 100644
@@ -512,6 +512,16 @@
             "${libdir}/python${PYTHON_MAJMIN}/__pycache__/difflib.*.pyc"
         ]
     },
+    "distutils-windows": {
+        "cached": [],
+        "files": [
+            "${libdir}/python${PYTHON_MAJMIN}/distutils/command/wininst-*.exe"
+        ],
+        "rdepends": [
+            "distutils"
+        ],
+        "summary": "Python distribution utilities (Windows installer stubs)"
+    },
     "distutils": {
         "summary": "Python Distribution Utilities",
         "rdepends": [
@@ -789,6 +799,9 @@
             "xml",
             "xmlrpc"
         ],
+        "rrecommends": [
+            "distutils-windows"
+        ],
         "summary": "All Python modules"
     },
     "multiprocessing": {
Signature · 1 line
2.20.1