Prepared the install and uninstall scripts. eric7

Thu, 20 May 2021 19:52:44 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 20 May 2021 19:52:44 +0200
branch
eric7
changeset 8339
75908476226e
parent 8338
29feb4027695
child 8340
439b5c4c9115

Prepared the install and uninstall scripts.

linux/eric7.appdata.xml file | annotate | diff | comparison | revisions
linux/eric7.appdata.xml.in file | annotate | diff | comparison | revisions
linux/eric7.desktop file | annotate | diff | comparison | revisions
linux/eric7.desktop.in file | annotate | diff | comparison | revisions
linux/eric7_browser.desktop file | annotate | diff | comparison | revisions
linux/eric7_browser.desktop.in file | annotate | diff | comparison | revisions
scripts/install.py file | annotate | diff | comparison | revisions
scripts/uninstall.py file | annotate | diff | comparison | revisions
--- a/linux/eric7.appdata.xml	Thu May 20 19:22:05 2021 +0200
+++ b/linux/eric7.appdata.xml	Thu May 20 19:52:44 2021 +0200
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <component type="desktop">
- <id>eric6.desktop</id>
+ <id>eric7.desktop</id>
  <metadata_license>CC-BY-3.0</metadata_license>
  <project_license>GPL-3.0+</project_license>
- <name>eric6</name>
+ <name>eric7</name>
  <summary>Integrated Development Environment for Python</summary>
  <description>
   <p>
@@ -29,31 +29,31 @@
  <url type="donation">https://www.paypal.com/cgi-bin/webscr?item_name=Donation+to+Eric+Integrated+Development+Environment&amp;cmd=_donations&amp;business=detlev@die-offenbachs.de</url>
  <update_contact>detlev_AT_die-offenbachs.de</update_contact>
  <developer_name>Detlev Offenbach</developer_name>
- <translation type="qt">eric6</translation>
+ <translation type="qt">eric7</translation>
  <provides>
-   <binary>eric6</binary>
-   <binary>eric6_api</binary>
-   <binary>eric6_browser</binary>
-   <binary>eric6_compare</binary>
-   <binary>eric6_configure</binary>
-   <binary>eric6_diff</binary>
-   <binary>eric6_doc</binary>
-   <binary>eric6_editor</binary>
-   <binary>eric6_hexeditor</binary>
-   <binary>eric6_iconeditor</binary>
-   <binary>eric6_plugininstall</binary>
-   <binary>eric6_pluginrepository</binary>
-   <binary>eric6_pluginuninstall</binary>
-   <binary>eric6_qregexp</binary>
-   <binary>eric6_qregularexpression</binary>
-   <binary>eric6_re</binary>
-   <binary>eric6_shell</binary>
-   <binary>eric6_snap</binary>
-   <binary>eric6_sqlbrowser</binary>
-   <binary>eric6_tray</binary>
-   <binary>eric6_trpreviewer</binary>
-   <binary>eric6_uipreviewer</binary>
-   <binary>eric6_unittest</binary>
+   <binary>eric7</binary>
+   <binary>eric7_api</binary>
+   <binary>eric7_browser</binary>
+   <binary>eric7_compare</binary>
+   <binary>eric7_configure</binary>
+   <binary>eric7_diff</binary>
+   <binary>eric7_doc</binary>
+   <binary>eric7_editor</binary>
+   <binary>eric7_hexeditor</binary>
+   <binary>eric7_iconeditor</binary>
+   <binary>eric7_plugininstall</binary>
+   <binary>eric7_pluginrepository</binary>
+   <binary>eric7_pluginuninstall</binary>
+   <binary>eric7_qregexp</binary>
+   <binary>eric7_qregularexpression</binary>
+   <binary>eric7_re</binary>
+   <binary>eric7_shell</binary>
+   <binary>eric7_snap</binary>
+   <binary>eric7_sqlbrowser</binary>
+   <binary>eric7_tray</binary>
+   <binary>eric7_trpreviewer</binary>
+   <binary>eric7_uipreviewer</binary>
+   <binary>eric7_unittest</binary>
  </provides>
  <releases>
    <release version="@VERSION@" date="@DATE@" />
--- a/linux/eric7.appdata.xml.in	Thu May 20 19:22:05 2021 +0200
+++ b/linux/eric7.appdata.xml.in	Thu May 20 19:52:44 2021 +0200
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <component type="desktop">
- <id>eric6@MARKER@.desktop</id>
+ <id>eric7@MARKER@.desktop</id>
  <metadata_license>CC-BY-3.0</metadata_license>
  <project_license>GPL-3.0+</project_license>
- <name>eric6@MARKER@</name>
+ <name>eric7@MARKER@</name>
  <summary>Integrated Development Environment for Python</summary>
  <description>
   <p>
@@ -29,31 +29,31 @@
  <url type="donation">https://www.paypal.com/cgi-bin/webscr?item_name=Donation+to+Eric+Integrated+Development+Environment&amp;cmd=_donations&amp;business=detlev@die-offenbachs.de</url>
  <update_contact>detlev_AT_die-offenbachs.de</update_contact>
  <developer_name>Detlev Offenbach</developer_name>
- <translation type="qt">eric6</translation>
+ <translation type="qt">eric7</translation>
  <provides>
-   <binary>eric6</binary>
-   <binary>eric6_api</binary>
-   <binary>eric6_browser</binary>
-   <binary>eric6_compare</binary>
-   <binary>eric6_configure</binary>
-   <binary>eric6_diff</binary>
-   <binary>eric6_doc</binary>
-   <binary>eric6_editor</binary>
-   <binary>eric6_hexeditor</binary>
-   <binary>eric6_iconeditor</binary>
-   <binary>eric6_plugininstall</binary>
-   <binary>eric6_pluginrepository</binary>
-   <binary>eric6_pluginuninstall</binary>
-   <binary>eric6_qregexp</binary>
-   <binary>eric6_qregularexpression</binary>
-   <binary>eric6_re</binary>
-   <binary>eric6_shell</binary>
-   <binary>eric6_snap</binary>
-   <binary>eric6_sqlbrowser</binary>
-   <binary>eric6_tray</binary>
-   <binary>eric6_trpreviewer</binary>
-   <binary>eric6_uipreviewer</binary>
-   <binary>eric6_unittest</binary>
+   <binary>eric7</binary>
+   <binary>eric7_api</binary>
+   <binary>eric7_browser</binary>
+   <binary>eric7_compare</binary>
+   <binary>eric7_configure</binary>
+   <binary>eric7_diff</binary>
+   <binary>eric7_doc</binary>
+   <binary>eric7_editor</binary>
+   <binary>eric7_hexeditor</binary>
+   <binary>eric7_iconeditor</binary>
+   <binary>eric7_plugininstall</binary>
+   <binary>eric7_pluginrepository</binary>
+   <binary>eric7_pluginuninstall</binary>
+   <binary>eric7_qregexp</binary>
+   <binary>eric7_qregularexpression</binary>
+   <binary>eric7_re</binary>
+   <binary>eric7_shell</binary>
+   <binary>eric7_snap</binary>
+   <binary>eric7_sqlbrowser</binary>
+   <binary>eric7_tray</binary>
+   <binary>eric7_trpreviewer</binary>
+   <binary>eric7_uipreviewer</binary>
+   <binary>eric7_unittest</binary>
  </provides>
  <releases>
    <release version="@VERSION@" date="@DATE@" />
--- a/linux/eric7.desktop	Thu May 20 19:22:05 2021 +0200
+++ b/linux/eric7.desktop	Thu May 20 19:52:44 2021 +0200
@@ -1,13 +1,13 @@
 [Desktop Entry]
 Version=1.0
 Type=Application
-Exec=@BINDIR@/eric6
-TryExec=@BINDIR@/eric6
+Exec=@BINDIR@/eric7
+TryExec=@BINDIR@/eric7
 MimeType=text/x-python;
 Icon=eric
 Terminal=false
-Name=eric6
-Name[de]=eric6
+Name=eric7
+Name[de]=eric7
 Comment=Integrated Development Environment for Python
 Comment[de]=Integrierte Entwicklungsumgebung für Python
 GenericName=IDE for Python
--- a/linux/eric7.desktop.in	Thu May 20 19:22:05 2021 +0200
+++ b/linux/eric7.desktop.in	Thu May 20 19:52:44 2021 +0200
@@ -1,13 +1,13 @@
 [Desktop Entry]
 Version=1.0
 Type=Application
-Exec=@BINDIR@/eric6@MARKER@
-TryExec=@BINDIR@/eric6@MARKER@
+Exec=@BINDIR@/eric7@MARKER@
+TryExec=@BINDIR@/eric7@MARKER@
 MimeType=text/x-python;
 Icon=eric@MARKER@
 Terminal=false
-Name=eric6@PY_MARKER@
-Name[de]=eric6@PY_MARKER@
+Name=eric7@PY_MARKER@
+Name[de]=eric7@PY_MARKER@
 Comment=Integrated Development Environment for Python
 Comment[de]=Integrierte Entwicklungsumgebung für Python
 GenericName=IDE for Python
--- a/linux/eric7_browser.desktop	Thu May 20 19:22:05 2021 +0200
+++ b/linux/eric7_browser.desktop	Thu May 20 19:52:44 2021 +0200
@@ -1,13 +1,13 @@
 [Desktop Entry]
 Version=1.0
 Type=Application
-Exec=@BINDIR@/eric6_browser
-TryExec=@BINDIR@/eric6_browser
+Exec=@BINDIR@/eric7_browser
+TryExec=@BINDIR@/eric7_browser
 MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-mimearchive;
 Icon=ericWeb48
 Terminal=false
-Name=eric6 Web Browser
-Name[de]=eric6 Web Browser
+Name=eric7 Web Browser
+Name[de]=eric7 Web Browser
 Comment=Web Browser for PyQt5 based on QtWebEngine
 Comment[de]=Web Browser für PyQt5 basierend auf QtWebEngine
 GenericName=Web Browser
--- a/linux/eric7_browser.desktop.in	Thu May 20 19:22:05 2021 +0200
+++ b/linux/eric7_browser.desktop.in	Thu May 20 19:52:44 2021 +0200
@@ -1,13 +1,13 @@
 [Desktop Entry]
 Version=1.0
 Type=Application
-Exec=@BINDIR@/eric6_browser@MARKER@
-TryExec=@BINDIR@/eric6_browser@MARKER@
+Exec=@BINDIR@/eric7_browser@MARKER@
+TryExec=@BINDIR@/eric7_browser@MARKER@
 MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-mimearchive;
 Icon=ericWeb@MARKER@
 Terminal=false
-Name=eric6 Web Browser@PY_MARKER@
-Name[de]=eric6 Web Browser@PY_MARKER@
+Name=eric7 Web Browser@PY_MARKER@
+Name[de]=eric7 Web Browser@PY_MARKER@
 Comment=Web Browser for PyQt5 based on QtWebEngine
 Comment[de]=Web Browser für PyQt5 basierend auf QtWebEngine
 GenericName=Web Browser
--- a/scripts/install.py	Thu May 20 19:22:05 2021 +0200
+++ b/scripts/install.py	Thu May 20 19:52:44 2021 +0200
@@ -41,7 +41,7 @@
 forceCleanDesktopLinks = False
 doCompile = True
 yes2All = False
-ignorePyqt5Tools = False
+ignorePyqt6Tools = False
 cfg = {}
 progLanguages = ["Python", "Ruby", "QSS"]
 sourceDir = "eric"
@@ -65,25 +65,25 @@
 # Define blacklisted versions of the prerequisites
 BlackLists = {
     "sip": [],
-    "PyQt5": [],
+    "PyQt6": [],
     "QScintilla2": [],
 }
 PlatformsBlackLists = {
     "windows": {
         "sip": [],
-        "PyQt5": [],
+        "PyQt6": [],
         "QScintilla2": [],
     },
     
     "linux": {
         "sip": [],
-        "PyQt5": [],
+        "PyQt6": [],
         "QScintilla2": [],
     },
     
     "mac": {
         "sip": [],
-        "PyQt5": [],
+        "PyQt6": [],
         "QScintilla2": [],
     },
 }
@@ -162,8 +162,8 @@
         print("    --clean-desktop delete desktop links before installation")
     print("    --no-info  don't create the install info file")
     if sys.platform != "darwin":
-        print("    --no-tools don't ask for installation of pyqt5-tools"
-              "/qt5-applications")
+        print("    --no-tools don't ask for installation of pyqt6-tools"
+              "/qt6-applications")
     print("    -x         don't perform dependency checks (use on your own"
           " risk)")
     print("    -z         don't compile the installed python files")
@@ -221,7 +221,7 @@
     modDir = distutils.sysconfig.get_python_lib(True)
     pyModDir = modDir
     
-    pyqtDataDir = os.path.join(modDir, "PyQt5")
+    pyqtDataDir = os.path.join(modDir, "PyQt6")
     if os.path.exists(os.path.join(pyqtDataDir, "qsci")):
         # it's the installer
         qtDataDir = pyqtDataDir
@@ -517,8 +517,6 @@
         "eric7_pluginrepository", "eric7_sqlbrowser",
         "eric7_iconeditor", "eric7_snap", "eric7_hexeditor",
         "eric7_browser", "eric7_shell",
-        # from Python2 era
-        "eric7_webbrowser",
     ]
     
     try:
@@ -586,13 +584,13 @@
             "/usr/share/applications/eric7.desktop",
             "/usr/share/appdata/eric7.appdata.xml",
             "/usr/share/metainfo/eric7.appdata.xml",
-            "/usr/share/applications/eric7_browser.desktop",
             "/usr/share/pixmaps/eric.png",
-            "/usr/share/pixmaps/ericWeb.png",
             "/usr/share/icons/eric.png",
-            "/usr/share/icons/ericWeb.png",
-            # from Python2 era
-            "/usr/share/applications/eric7_webbrowser.desktop",
+            
+            # TODO: enable this once PyQt 6.2.0/Qt 6.2.0 is released
+            #~ "/usr/share/applications/eric7_browser.desktop",
+            #~ "/usr/share/pixmaps/ericWeb.png",
+            #~ "/usr/share/icons/ericWeb.png",
         ]:
             if os.path.exists(name):
                 os.remove(name)
@@ -602,13 +600,13 @@
             "~/.local/share/applications/eric7.desktop",
             "~/.local/share/appdata/eric7.appdata.xml",
             "~/.local/share/metainfo/eric7.appdata.xml",
-            "~/.local/share/applications/eric7_browser.desktop",
             "~/.local/share/pixmaps/eric.png",
-            "~/.local/share/pixmaps/ericWeb.png",
             "~/.local/share/icons/eric.png",
-            "~/.local/share/icons/ericWeb.png",
-            # from Python2 era
-            "/usr/share/applications/eric7_webbrowser.desktop",
+            
+            # TODO: enable this once PyQt 6.2.0/Qt 6.2.0 is released
+            #~ "~/.local/share/applications/eric7_browser.desktop",
+            #~ "~/.local/share/pixmaps/ericWeb.png",
+            #~ "~/.local/share/icons/ericWeb.png",
         ]:
             path = os.path.expanduser(name)
             if os.path.exists(path):
@@ -711,13 +709,14 @@
     wnames = []
     for name in ["eric7_api", "eric7_doc"]:
         wnames.append(createPyWrapper(cfg['ericDir'], name, scriptsDir, False))
+    # TODO: add "eric7_browser" once PyQt 6.2.0/Qt 6.2.0 is released
     for name in ["eric7_compare", "eric7_configure", "eric7_diff",
                  "eric7_editor", "eric7_hexeditor", "eric7_iconeditor",
                  "eric7_plugininstall", "eric7_pluginrepository",
                  "eric7_pluginuninstall", "eric7_qregularexpression",
                  "eric7_re", "eric7_snap", "eric7_sqlbrowser", "eric7_tray",
                  "eric7_trpreviewer", "eric7_uipreviewer", "eric7_unittest",
-                 "eric7_browser", "eric7_shell", "eric7"]:
+                 "eric7_shell", "eric7"]:
         wnames.append(createPyWrapper(cfg['ericDir'], name, scriptsDir))
     
     # set install prefix, if not None
@@ -800,10 +799,12 @@
             os.path.join(eric7SourceDir, "UI", "data"),
             os.path.join(cfg['ericDir'], "UI", "data"),
             ['*.css'])
-        copyTree(
-            os.path.join(eric7SourceDir, "WebBrowser"),
-            os.path.join(cfg['ericDir'], "WebBrowser"),
-            ['*.xbel', '*.xml', '*.html', '*.png', '*.gif', '*.js'])
+        # TODO: enable this once PyQt 6.2.0/Qt 6.2.0 is released
+        if False:
+            copyTree(
+                os.path.join(eric7SourceDir, "WebBrowser"),
+                os.path.join(cfg['ericDir'], "WebBrowser"),
+                ['*.xbel', '*.xml', '*.html', '*.png', '*.gif', '*.js'])
         
         # copy the wrappers
         for wname in wnames:
@@ -945,9 +946,11 @@
             os.makedirs(dst)
         copyDesktopFile(os.path.join(sourceDir, "linux", "eric7.desktop.in"),
                         os.path.join(dst, "eric7.desktop"))
-        copyDesktopFile(
-            os.path.join(sourceDir, "linux", "eric7_browser.desktop.in"),
-            os.path.join(dst, "eric7_browser.desktop"))
+        # TODO: enable this once PyQt 6.2.0/Qt 6.2.0 is released
+        if False:
+            copyDesktopFile(
+                os.path.join(sourceDir, "linux", "eric7_browser.desktop.in"),
+                os.path.join(dst, "eric7_browser.desktop"))
         dst = os.path.normpath(
             os.path.join(distDir, "usr/share/metainfo"))
         if not os.path.exists(dst):
@@ -973,9 +976,11 @@
         shutilCopy(
             os.path.join(eric7SourceDir, "pixmaps", "ericWeb48_icon.png"),
             "/usr/share/icons/ericWeb.png")
-        copyDesktopFile(
-            os.path.join(sourceDir, "linux", "eric7_browser.desktop.in"),
-            "/usr/share/applications/eric7_browser.desktop")
+        # TODO: enable this once PyQt 6.2.0/Qt 6.2.0 is released
+        if False:
+            copyDesktopFile(
+                os.path.join(sourceDir, "linux", "eric7_browser.desktop.in"),
+                "/usr/share/applications/eric7_browser.desktop")
     elif os.getuid() >= 1000:
         # it is assumed, that user ids start at 1000
         localPath = os.path.join(os.path.expanduser("~"),
@@ -1002,9 +1007,11 @@
         shutilCopy(
             os.path.join(eric7SourceDir, "pixmaps", "ericWeb48_icon.png"),
             os.path.join(localPath, "icons", "ericWeb.png"))
-        copyDesktopFile(
-            os.path.join(sourceDir, "linux", "eric7_browser.desktop.in"),
-            os.path.join(localPath, "applications", "eric7_browser.desktop"))
+        # TODO: enable this once PyQt 6.2.0/Qt 6.2.0 is released
+        if False:
+            copyDesktopFile(
+                os.path.join(sourceDir, "linux", "eric7_browser.desktop.in"),
+                os.path.join(localPath, "applications", "eric7_browser.desktop"))
 
 
 def createWindowsLinks():
@@ -1447,25 +1454,25 @@
         from PyQt6.QtCore import qVersion
     except ImportError as msg:
         installed = not isSudo and pipInstall(
-            "PyQt5>=5.12.1",
-            "'PyQt5' could not be detected.\nError: {0}".format(msg)
+            "PyQt6>=6.1.0",
+            "'PyQt6' could not be detected.\nError: {0}".format(msg)
         )
         if installed:
             # try to import it again
             try:
                 from PyQt6.QtCore import qVersion
             except ImportError as msg:
-                print('Sorry, please install PyQt5.')
+                print('Sorry, please install PyQt6.')
                 print('Error: {0}'.format(msg))
                 exit(1)
         else:
-            print('Sorry, please install PyQt5.')
+            print('Sorry, please install PyQt6.')
             print('Error: {0}'.format(msg))
             exit(1)
-    print("Found PyQt5")
+    print("Found PyQt6")
     
     try:
-        pyuic = "pyuic5"
+        pyuic = "pyuic6"
         from PyQt6 import uic      # __IGNORE_WARNING__
     except ImportError as msg:
         print("Sorry, {0} is not installed.".format(pyuic))
@@ -1473,29 +1480,28 @@
         exit(1)
     print("Found {0}".format(pyuic))
     
-    try:
-        from PyQt6 import QtWebEngineWidgets    # __IGNORE_WARNING__
-    except ImportError as msg:
-        from PyQt6.QtCore import PYQT_VERSION
-        if PYQT_VERSION >= 0x050c00:
-            # PyQt 5.12 separated QtWebEngine into a separate wheel
+    # TODO: enable this once PyQt 6.2.0/Qt 6.2.0 is released
+    if False:
+        try:
+            from PyQt6 import QtWebEngineWidgets    # __IGNORE_WARNING__
+        except ImportError as msg:
             if isSudo:
-                print("Optional 'PyQtWebEngine' could not be detected.")
+                print("Optional 'PyQt6-WebEngine' could not be detected.")
             else:
                 pipInstall(
-                    "PyQtWebEngine>=5.12.1",
-                    "Optional 'PyQtWebEngine' could not be detected.\n"
+                    "PyQt6-WebEngine>=6.2.0",
+                    "Optional 'PyQt6-WebEngine' could not be detected.\n"
                     "Error: {0}".format(msg)
                 )
     
     try:
-        from PyQt6 import QtChart    # __IGNORE_WARNING__
+        from PyQt6 import QtCharts    # __IGNORE_WARNING__
     except ImportError as msg:
         if isSudo:
-            print("Optional 'PyQtChart' could not be detected.")
+            print("Optional 'PyQt6-Charts' could not be detected.")
         else:
             pipInstall(
-                "PyQtChart>=5.12.1",
+                "PyQt6-Charts>=6.1.0",
                 "Optional 'PyQtChart' could not be detected.\n"
                 "Error: {0}".format(msg)
             )
@@ -1504,8 +1510,8 @@
         from PyQt6 import Qsci      # __IGNORE_WARNING__
     except ImportError as msg:
         installed = not isSudo and pipInstall(
-            "QScintilla",
-            "'QScintilla' could not be detected.\nError: {0}".format(msg)
+            "PyQt6-QScintilla",
+            "'PyQt6-QScintilla' could not be detected.\nError: {0}".format(msg)
         )
         if installed:
             # try to import it again
@@ -1515,22 +1521,23 @@
             except ImportError as msg:
                 message = str(msg)
         else:
-            message = "QScintilla could not be installed."
+            message = "PyQt6-QScintilla could not be installed."
         if message:
             print("Sorry, please install QScintilla2 and")
-            print("its PyQt5 wrapper.")
+            print("its PyQt6 wrapper.")
             print('Error: {0}'.format(message))
             exit(1)
-    print("Found QScintilla2")
+    print("Found PyQt6-QScintilla")
     
     impModulesList = [
-        "PyQt5.QtGui", "PyQt5.QtNetwork", "PyQt5.QtPrintSupport",
-        "PyQt5.QtSql", "PyQt5.QtSvg", "PyQt5.QtWidgets",
+        "PyQt6.QtGui", "PyQt6.QtNetwork", "PyQt6.QtPrintSupport",
+        "PyQt6.QtSql", "PyQt6.QtSvg", "PyQt6.QtSvgWidgets", "PyQt6.QtWidgets",
     ]
     altModulesList = [
         # Tuple with alternatives, flag indicating it's ok to not be
         # available (e.g. for 32-Bit Windows)
-        (("PyQt5.QtWebEngineWidgets", ), sys.maxsize <= 2**32),
+        # TODO: enable this once PyQt 6.2.0/Qt 6.2.0 is released
+        #~ (("PyQt6.QtWebEngineWidgets", ), sys.maxsize <= 2**32),
     ]
     optionalModulesList = {
         # key is pip project name
@@ -1548,9 +1555,10 @@
         "pyenchant": ("enchant", ""),
     }
     # dict with tuples of package name and install constraint
-    if sys.platform != "darwin" and not ignorePyqt5Tools:
-        optionalModulesList["qt5-applications"] = ("qt5_applications",
-                                                   "<5.15.2")
+    # TODO: enable this once qt6_applications is released
+    if False:
+        if sys.platform != "darwin" and not ignorePyqt6Tools:
+            optionalModulesList["qt6-applications"] = ("qt6_applications", "")
     
     # check mandatory modules
     modulesOK = True
@@ -1611,8 +1619,8 @@
     qtMajor = int(qVersion().split('.')[0])
     qtMinor = int(qVersion().split('.')[1])
     print("Qt Version: {0}".format(qVersion().strip()))
-    if qtMajor == 5 and qtMinor < 12:
-        print('Sorry, you must have Qt version 5.12.0 or better.')
+    if qtMajor == 6 and qtMinor < 1:
+        print('Sorry, you must have Qt version 6.1.0 or better.')
         exit(2)
     
     # check version of sip
@@ -1627,16 +1635,16 @@
         if "snapshot" not in sipVersion and "dev" not in sipVersion:
             while sipVersion.count('.') < 2:
                 sipVersion += '.0'
-            (major, minor, pat) = sipVersion.split('.')
+            (major, minor, pat) = sipVersion.split('.')[:3]
             major = int(major)
             minor = int(minor)
             pat = int(pat)
             if (
-                major < 5 or
-                (major == 5 and minor < 0) or
-                (major == 5 and minor == 0 and pat < 0)
+                major < 6 or
+                (major == 6 and minor < 0) or
+                (major == 6 and minor == 1 and pat < 0)
             ):
-                print('Sorry, you must have sip 5.0.0 or higher or'
+                print('Sorry, you must have sip 6.1.0 or higher or'
                       ' a recent snapshot release.')
                 exit(3)
             # check for blacklisted versions
@@ -1656,16 +1664,16 @@
     if "snapshot" not in pyqtVersion and "dev" not in pyqtVersion:
         while pyqtVersion.count('.') < 2:
             pyqtVersion += '.0'
-        (major, minor, pat) = pyqtVersion.split('.')
+        (major, minor, pat) = pyqtVersion.split('.')[:3]
         major = int(major)
         minor = int(minor)
         pat = int(pat)
-        if major == 5 and minor < 12:
-            print('Sorry, you must have PyQt 5.12.0 or better or'
+        if major == 6 and minor < 1:
+            print('Sorry, you must have PyQt 6.1.0 or better or'
                   ' a recent snapshot release.')
             exit(4)
         # check for blacklisted versions
-        for vers in BlackLists["PyQt5"] + PlatformBlackLists["PyQt5"]:
+        for vers in BlackLists["PyQt6"] + PlatformBlackLists["PyQt6"]:
             if vers == pyqtVersion:
                 print('Sorry, PyQt version {0} is not compatible with eric.'
                       .format(vers))
@@ -1675,21 +1683,22 @@
     # check version of QScintilla
     from PyQt6.Qsci import QSCINTILLA_VERSION_STR
     scintillaVersion = QSCINTILLA_VERSION_STR
-    print("QScintilla Version:", QSCINTILLA_VERSION_STR.strip())
+    print("PyQt6-QScintilla Version:", QSCINTILLA_VERSION_STR.strip())
     # always assume, that snapshots or dev versions are new enough
     if "snapshot" not in scintillaVersion and "dev" not in scintillaVersion:
         while scintillaVersion.count('.') < 2:
             scintillaVersion += '.0'
-        (major, minor, pat) = scintillaVersion.split('.')
+        (major, minor, pat) = scintillaVersion.split('.')[:3]
         major = int(major)
         minor = int(minor)
         pat = int(pat)
         if (
             major < 2 or
-            (major == 2 and minor < 11) or
-            (major == 2 and minor == 11 and pat < 1)
+            (major == 2 and minor < 12) or
+            # TODO: raise pat once QScintilla 2.12.2 is released
+            (major == 2 and minor == 12 and pat < 1)
         ):
-            print('Sorry, you must have QScintilla 2.11.1 or higher or'
+            print('Sorry, you must have PyQt6-QScintilla 2.12.1 or higher or'
                   ' a recent snapshot release.')
             exit(5)
         # check for blacklisted versions
@@ -1706,11 +1715,11 @@
     
     # print version info for additional modules
     with contextlib.suppress(NameError, AttributeError):
-        print("PyQtChart:", QtChart.PYQT_CHART_VERSION_STR)
+        print("PyQt6-Chart:", QtCharts.PYQT_CHART_VERSION_STR)
     
     with contextlib.suppress(ImportError, AttributeError):
         from PyQt6 import QtWebEngine
-        print("PyQtWebEngine.", QtWebEngine.PYQT_WEBENGINE_VERSION_STR)
+        print("PyQt6-WebEngine.", QtWebEngine.PYQT_WEBENGINE_VERSION_STR)
     
     print("All dependencies ok.")
     print()
@@ -1841,9 +1850,10 @@
         ("eric7 (Python {0}.{1}).lnk",
          os.path.join(cfg["bindir"], "eric7.cmd"),
          os.path.join(cfg["ericPixDir"], "eric7.ico")),
-        ("eric7 Browser (Python {0}.{1}).lnk",
-         os.path.join(cfg["bindir"], "eric7_browse.cmd"),
-         os.path.join(cfg["ericPixDir"], "ericWeb48.ico")),
+        # TODO: enable this once PyQt 6.2.0/Qt 6.2.0 is released
+        #~ ("eric7 Browser (Python {0}.{1}).lnk",
+        #~  os.path.join(cfg["bindir"], "eric7_browse.cmd"),
+        #~  os.path.join(cfg["ericPixDir"], "ericWeb48.ico")),
     ]
     
     return [
@@ -1878,7 +1888,7 @@
     global macAppBundlePath, macAppBundleName, macPythonExe
     global installApis, doCleanDesktopLinks, yes2All
     global createInstallInfoFile, installCwd
-    global ignorePyqt5Tools
+    global ignorePyqt6Tools
     
     if sys.version_info < (3, 6, 0) or sys.version_info > (3, 99, 99):
         print('Sorry, eric requires at least Python 3.6 for running.')
@@ -1955,7 +1965,7 @@
         elif opt == "--yes":
             yes2All = True
         elif opt == "--no-tools":
-            ignorePyqt5Tools = True
+            ignorePyqt6Tools = True
         elif opt == "--no-info":
             createInstallInfoFile = False
     
--- a/scripts/uninstall.py	Thu May 20 19:22:05 2021 +0200
+++ b/scripts/uninstall.py	Thu May 20 19:52:44 2021 +0200
@@ -24,7 +24,7 @@
 progLanguages = ["Python", "Ruby", "QSS"]
 defaultMacAppBundleName = "eric7.app"
 defaultMacAppBundlePath = "/Applications"
-settingsNameOrganization = "Eric6"
+settingsNameOrganization = "Eric7"
 settingsNameGlobal = "eric7"
 
 
@@ -132,8 +132,6 @@
         "eric7_pluginrepository", "eric7_sqlbrowser",
         "eric7_iconeditor", "eric7_snap", "eric7_hexeditor",
         "eric7_browser", "eric7_shell",
-        # from Python2 era
-        "eric7_webbrowser",
     ]
     
     try:
@@ -257,8 +255,6 @@
             "/usr/share/pixmaps/ericWeb.png",
             "/usr/share/icons/eric.png",
             "/usr/share/icons/ericWeb.png",
-            # from Python2 era
-            "/usr/share/applications/eric7_webbrowser.desktop",
         ]:
             if os.path.exists(name):
                 os.remove(name)
@@ -273,8 +269,6 @@
             "~/.local/share/pixmaps/ericWeb.png",
             "~/.local/share/icons/eric.png",
             "~/.local/share/icons/ericWeb.png",
-            # from Python2 era
-            "/usr/share/applications/eric7_webbrowser.desktop",
         ]:
             path = os.path.expanduser(name)
             if os.path.exists(path):
@@ -285,8 +279,8 @@
     """
     Uninstall the macOS application bundle.
     """
-    if os.path.exists("/Developer/Applications/Eric6"):
-        shutil.rmtree("/Developer/Applications/Eric6")
+    if os.path.exists("/Developer/Applications/Eric7"):
+        shutil.rmtree("/Developer/Applications/Eric7")
     try:
         macAppBundlePath = getConfig("macAppBundlePath")
         macAppBundleName = getConfig("macAppBundleName")
@@ -356,7 +350,7 @@
         print("cannot be determined. You have to remove it manually.\n")
         return
     
-    settings = QSettings(QSettings.IniFormat, QSettings.UserScope,
+    settings = QSettings(QSettings.Format.IniFormat, QSettings.Scope.UserScope,
                          settingsNameOrganization, settingsNameGlobal)
     settingsDir = os.path.dirname(settings.fileName())
     if os.path.exists(settingsDir):

eric ide

mercurial