PipInterface/PipPackagesInputDialog.py

branch
pypi
changeset 6795
6e2ed2aac325
parent 6782
390a45748883
equal deleted inserted replaced
6793:cca6a35f3ad2 6795:6e2ed2aac325
37 37
38 self.setWindowTitle(title) 38 self.setWindowTitle(title)
39 39
40 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) 40 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
41 41
42 self.venvComboBox.addItem(pip.getDefaultEnvironmentString())
43 projectVenv = pip.getProjectEnvironmentString()
44 if projectVenv:
45 self.venvComboBox.addItem(projectVenv)
46 self.venvComboBox.addItems(pip.getVirtualenvNames())
47
48 self.userCheckBox.setVisible(install) 42 self.userCheckBox.setVisible(install)
49 43
50 msh = self.minimumSizeHint() 44 msh = self.minimumSizeHint()
51 self.resize(max(self.width(), msh.width()), msh.height()) 45 self.resize(max(self.width(), msh.width()), msh.height())
52 46
62 56
63 def getData(self): 57 def getData(self):
64 """ 58 """
65 Public method to get the entered data. 59 Public method to get the entered data.
66 60
67 @return tuple with the environment name, the list of package 61 @return tuple with the list of package specifications and a flag
68 specifications and a flag indicating to install to the user 62 indicating to install to the user install directory
69 install directory 63 @rtype tuple of (list of str, bool)
70 @rtype tuple of (str, list of str, bool)
71 """ 64 """
72 packages = [p.strip() for p in self.packagesEdit.text().split()] 65 packages = [p.strip() for p in self.packagesEdit.text().split()]
73 66
74 return ( 67 return (
75 self.venvComboBox.currentText(),
76 packages, 68 packages,
77 self.userCheckBox.isChecked() 69 self.userCheckBox.isChecked()
78 ) 70 )

eric ide

mercurial