浏览代码

Build final 2022.3.8 with a fix for --use-deprecated=legacy-resolver

Joachim M. Giæver 2 年之前
父节点
当前提交
08d19357f4
共有 2 个文件被更改,包括 9 次插入6 次删除
  1. 8 5
      snap/plugins/python_wot_plugin.py
  2. 1 1
      snap/snapcraft.yaml

+ 8 - 5
snap/plugins/python_wot_plugin.py

@@ -21,10 +21,13 @@ class PluginImpl(plugins.python.PythonPlugin):
         #  cmds.insert(2, 'python3 -m pip install -U "setuptools<58"')
         #cmds.insert(1, 'pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip')
         for idx, cmd in enumerate(cmds):
+            if cmd.strip().startswith('pip install -c'):
+                cmds[idx] = f"{cmd.strip()} --use-deprecated=legacy-resolver"
             # Find position where to inject pip uninstall
-            if cmd.strip().startswith('[ -f setup.py ]'):
-                xcmds = cmd.split("&&", 1)
-                # Inject and force removal
-                # cmds[idx] = f"{xcmds[0]} && pip uninstall -y typing uuid && {xcmds[1]}"
-                cmds[idx] = f"{xcmds[0]} && pip uninstall -y typing uuid && {xcmds[1]}"
+            #  if cmd.strip().startswith('[ -f setup.py ]'):
+            #      xcmds = cmd.split("&&", 1)
+            #      # Inject and force removal
+            #      # cmds[idx] = f"{xcmds[0]} && pip uninstall -y typing uuid && {xcmds[1]}"
+            #      cmds[idx] = f"{xcmds[0]} && pip uninstall -y typing uuid && {xcmds[1]}"
+        #  print(cmds)
         return cmds

+ 1 - 1
snap/snapcraft.yaml

@@ -205,7 +205,7 @@ parts:
 
   homeassistant:
     after: [python]
-    plugin: python #-wot-plugin
+    plugin: python-wot-plugin
     source: https://github.com/home-assistant/core.git
     source-tag: ${SNAPCRAFT_PROJECT_VERSION}
     build-environment: