Wed, 21 Dec 2022 09:11:59 +0100
Adapted some import statements to eric 23.1 and newer.
--- a/ChangeLog Tue Oct 25 08:57:22 2022 +0200 +++ b/ChangeLog Wed Dec 21 09:11:59 2022 +0100 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 10.2.0 +- adapted some import statements to eric 23.1 and newer + Version 10.1.1 - bug fixes
--- a/PluginPyInstaller.epj Tue Oct 25 08:57:22 2022 +0200 +++ b/PluginPyInstaller.epj Wed Dec 21 09:11:59 2022 +0100 @@ -190,7 +190,8 @@ "PluginPyInstaller.epj", "PluginPyInstaller.zip", "PyInstallerInterface/Documentation/LICENSE.GPL3", - "PyInstallerInterface/Documentation/source" + "PyInstallerInterface/Documentation/source", + "pyproject.toml" ], "OTHERTOOLSPARMS": { "Black": { @@ -208,6 +209,23 @@ "py38", "py37" ] + }, + "isort": { + "combine_as_imports": true, + "config_source": "project", + "extend_skip_glob": [ + "*/Ui_*.py" + ], + "lines_between_types": 1, + "profile": "black", + "sort_order": "natural", + "supported_extensions": [ + "py", + "pyi", + "pyx", + "pxd", + "pyw" + ] } }, "PACKAGERSPARMS": {},
--- 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.",
--- a/PyInstallerInterface/PyInstallerConfigDialog.py Tue Oct 25 08:57:22 2022 +0200 +++ b/PyInstallerInterface/PyInstallerConfigDialog.py Wed Dec 21 09:11:59 2022 +0100 @@ -12,9 +12,14 @@ from PyQt6.QtCore import pyqtSlot from PyQt6.QtWidgets import QDialog, QDialogButtonBox -from eric7 import Globals from eric7.EricWidgets.EricPathPicker import EricPathPickerModes +try: + from eric7.SystemUtilities.OSUtilities import isMacPlatform, isWindowsPlatform +except ImportError: + # imports for eric < 23.1 + from eric7.Globals import isWindowsPlatform, isMacPlatform + from .Ui_PyInstallerConfigDialog import Ui_PyInstallerConfigDialog @@ -76,11 +81,11 @@ self.iconFilePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) self.iconFilePicker.setDefaultDirectory(self.__project.getProjectPath()) - if Globals.isMacPlatform(): + if isMacPlatform(): self.iconFilePicker.setFilters( self.tr("Icon Files (*.icns);;" "All Files (*)") ) - elif Globals.isWindowsPlatform(): + elif isWindowsPlatform(): self.iconFilePicker.setFilters( self.tr( "Icon Files (*.ico);;" "Executable Files (*.exe);;" "All Files (*)" @@ -90,10 +95,10 @@ # disable platform specific tabs self.tabWidget.setTabEnabled( self.tabWidget.indexOf(self.windowsMacTab), - Globals.isMacPlatform() or Globals.isWindowsPlatform(), + isMacPlatform() or isWindowsPlatform(), ) self.tabWidget.setTabEnabled( - self.tabWidget.indexOf(self.macTab), Globals.isMacPlatform() + self.tabWidget.indexOf(self.macTab), isMacPlatform() ) self.__initializeDefaults()
--- a/PyInstallerInterface/PyInstallerExecDialog.py Tue Oct 25 08:57:22 2022 +0200 +++ b/PyInstallerInterface/PyInstallerExecDialog.py Wed Dec 21 09:11:59 2022 +0100 @@ -10,8 +10,8 @@ import os -from PyQt6.QtCore import pyqtSlot, QProcess, QTimer -from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QAbstractButton +from PyQt6.QtCore import QProcess, QTimer, pyqtSlot +from PyQt6.QtWidgets import QAbstractButton, QDialog, QDialogButtonBox from eric7 import Preferences from eric7.EricWidgets import EricMessageBox
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pyproject.toml Wed Dec 21 09:11:59 2022 +0100 @@ -0,0 +1,10 @@ +[tool.isort] +profile = "black" +sort_order = "natural" +supported_extensions = ["py", "pyi", "pyx", "pxd", "pyw"] +lines_between_types = 1 +extend_skip_glob = [ + "*/Ui_*.py", +] +combine_as_imports = true +known_first_party = ["PyInstallerInterface", "eric7"]