123456789101112131415161718192021222324252627282930313233 |
- import snapcraft
- import snapcraft.plugins.v2 as plugins
- from typing import Any, Dict, List, Set
- import os
- """
- See snapcraft.plugins.v2.python.PythonPlugin
- Plugin forces removal of 'typing' package
- after setup, as 'typing' is causing problems
- for python >= 3.7, see:
- - https://github.com/pypa/pip/issues/8272
- """
- class PluginImpl(plugins.python.PythonPlugin):
- def get_build_commands(self) -> List[str]:
- cmds = super().get_build_commands()
-
-
-
- for idx, cmd in enumerate(cmds):
- if cmd.strip().startswith('pip install -c'):
- cmds[idx] = f"{cmd.strip()} --use-deprecated=legacy-resolver"
-
-
-
-
-
-
-
- return cmds
|