1import sys
2
3from medikit.globals import PIP_VERSION
4from medikit.steps.exec import System
5
6
7class Install(System):
8    def __init__(self, *packages):
9        if not len(packages):
10            packages = ("pip " + PIP_VERSION, "wheel", "twine")
11        packages = list(sorted(packages))
12        super().__init__(sys.executable + " -m pip install --upgrade " + " ".join(map(repr, packages)))
13        self.__args__ = (*packages,)
14