9015:dfeefad914ed | 9016:6f079c524e99 |
---|---|
6 """ | 6 """ |
7 Module implementing the Mercurial configuration page. | 7 Module implementing the Mercurial configuration page. |
8 """ | 8 """ |
9 | 9 |
10 import os | 10 import os |
11 import sys | |
12 | 11 |
13 from PyQt6.QtCore import pyqtSlot | 12 from PyQt6.QtCore import pyqtSlot |
14 | 13 |
15 from EricWidgets.EricApplication import ericApp | 14 from EricWidgets.EricApplication import ericApp |
16 | 15 |
18 ConfigurationPageBase | 17 ConfigurationPageBase |
19 ) | 18 ) |
20 from .Ui_MercurialPage import Ui_MercurialPage | 19 from .Ui_MercurialPage import Ui_MercurialPage |
21 from .. import HgUtilities | 20 from .. import HgUtilities |
22 | 21 |
22 import Globals | |
23 from Utilities import supportedCodecs | 23 from Utilities import supportedCodecs |
24 | 24 |
25 | 25 |
26 class MercurialPage(ConfigurationPageBase, Ui_MercurialPage): | 26 class MercurialPage(ConfigurationPageBase, Ui_MercurialPage): |
27 """ | 27 """ |
130 def on_installButton_clicked(self): | 130 def on_installButton_clicked(self): |
131 """ | 131 """ |
132 Private slot to install Mercurial alongside eric7. | 132 Private slot to install Mercurial alongside eric7. |
133 """ | 133 """ |
134 pip = ericApp().getObject("Pip") | 134 pip = ericApp().getObject("Pip") |
135 pip.installPackages(["mercurial"], interpreter=sys.executable) | 135 pip.installPackages(["mercurial"], |
136 interpreter=Globals.getPythonExecutable()) | |
136 self.installButton.setEnabled(not self.__mercurialInstalled()) | 137 self.installButton.setEnabled(not self.__mercurialInstalled()) |
137 | 138 |
138 def __mercurialInstalled(self): | 139 def __mercurialInstalled(self): |
139 """ | 140 """ |
140 Private method to check, if Mercurial is installed alongside eric7. | 141 Private method to check, if Mercurial is installed alongside eric7. |