6300:cfb21ace8d09 | 6301:f488d2cc5841 |
---|---|
28 | 28 |
29 import Preferences | 29 import Preferences |
30 import Globals | 30 import Globals |
31 | 31 |
32 | 32 |
33 # TODO: 1) change all uses of pip to python3 -m pip | |
34 # TODO: 2) support --user for install, install --upgrade and list | |
33 class Pip(QObject): | 35 class Pip(QObject): |
34 """ | 36 """ |
35 Class implementing the pip GUI logic. | 37 Class implementing the pip GUI logic. |
36 """ | 38 """ |
37 def __init__(self, plugin, parent=None): | 39 def __init__(self, plugin, parent=None): |
874 else: | 876 else: |
875 abort = False | 877 abort = False |
876 | 878 |
877 return abort | 879 return abort |
878 | 880 |
881 # TODO: add parameter userSite=False; arg: --user | |
879 def upgradePackages(self, packages, cmd=""): | 882 def upgradePackages(self, packages, cmd=""): |
880 """ | 883 """ |
881 Public method to upgrade the given list of packages. | 884 Public method to upgrade the given list of packages. |
882 | 885 |
883 @param packages list of packages to upgrade (list of string) | 886 @param packages list of packages to upgrade (list of string) |
912 if dlg.exec_() == QDialog.Accepted: | 915 if dlg.exec_() == QDialog.Accepted: |
913 command, packages = dlg.getData() | 916 command, packages = dlg.getData() |
914 if packages: | 917 if packages: |
915 self.upgradePackages(packages, cmd=command) | 918 self.upgradePackages(packages, cmd=command) |
916 | 919 |
920 # TODO: add parameter userSite=False; arg: --user | |
917 def installPackages(self, packages, cmd=""): | 921 def installPackages(self, packages, cmd=""): |
918 """ | 922 """ |
919 Public method to install the given list of packages. | 923 Public method to install the given list of packages. |
920 | 924 |
921 @param packages list of packages to install (list of string) | 925 @param packages list of packages to install (list of string) |