diff -r 40a4b95ca9be -r 37e614c54ea5 PluginPyInstaller.py --- a/PluginPyInstaller.py Tue Oct 25 08:57:22 2022 +0200 +++ b/PluginPyInstaller.py Wed Dec 21 09:11:59 2022 +0100 @@ -12,20 +12,26 @@ import platform import shutil -from PyQt6.QtCore import pyqtSlot, QObject, QCoreApplication, QTranslator, QProcess +from PyQt6.QtCore import QCoreApplication, QObject, QProcess, QTranslator, pyqtSlot from PyQt6.QtWidgets import QDialog -from eric7 import Utilities from eric7.EricGui.EricAction import EricAction from eric7.EricWidgets import EricMessageBox from eric7.EricWidgets.EricApplication import ericApp +try: + from eric7.SystemUtilities.OSUtilities import getEnvironmentEntry, isWindowsPlatform +except ImportError: + # imports for eric < 23.1 + from eric7.Globals import isWindowsPlatform + from eric7.Utilities import getEnvironmentEntry + # Start-Of-Header name = "PyInstaller Plugin" author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "10.1.1" +version = "10.2.0" className = "PyInstallerPlugin" packageName = "PyInstallerInterface" shortDescription = "Show dialogs to configure and execute PyInstaller." @@ -92,7 +98,7 @@ return [] executables = set() - if Utilities.isWindowsPlatform(): + if isWindowsPlatform(): # # Windows # @@ -162,7 +168,7 @@ if not executables and majorVersion >= 3: # check the PATH environment variable if nothing was found # Python 3 only - path = Utilities.getEnvironmentEntry("PATH") + path = getEnvironmentEntry("PATH") if path: dirs = path.split(os.pathsep) for directory in dirs: @@ -177,7 +183,7 @@ # There could be multiple pyinstaller executables in the path # e.g. for different python variants - path = Utilities.getEnvironmentEntry("PATH") + path = getEnvironmentEntry("PATH") # environment variable not defined if path is None: return [] @@ -226,7 +232,7 @@ exePy3 = _findExecutable(3) if not exePy3: - if Utilities.isWindowsPlatform(): + if isWindowsPlatform(): error = QCoreApplication.translate( "PyInstallerPlugin", "The pyinstaller.exe executable could not be found.",