scripts/install.py

branch
without_py2_and_pyqt4
changeset 7203
2079ccbfa335
parent 7192
a22eee00b052
child 7211
1c97f3142fa8
equal deleted inserted replaced
7202:d2f2a1fe0129 7203:2079ccbfa335
499 "eric6_tray", "eric6_editor", 499 "eric6_tray", "eric6_editor",
500 "eric6_plugininstall", "eric6_pluginuninstall", 500 "eric6_plugininstall", "eric6_pluginuninstall",
501 "eric6_pluginrepository", "eric6_sqlbrowser", 501 "eric6_pluginrepository", "eric6_sqlbrowser",
502 "eric6_iconeditor", "eric6_snap", "eric6_hexeditor", 502 "eric6_iconeditor", "eric6_snap", "eric6_hexeditor",
503 "eric6_browser", "eric6_shell", 503 "eric6_browser", "eric6_shell",
504 # from Python2 era
505 "eric6_webbrowser",
504 ] 506 ]
505 507
506 try: 508 try:
507 dirs = [platBinDir, getConfig('bindir')] 509 dirs = [platBinDir, getConfig('bindir')]
508 if platBinDirOld: 510 if platBinDirOld:
575 "/usr/share/appdata/eric6.appdata.xml", 577 "/usr/share/appdata/eric6.appdata.xml",
576 "/usr/share/metainfo/eric6.appdata.xml", 578 "/usr/share/metainfo/eric6.appdata.xml",
577 "/usr/share/applications/eric6_browser.desktop", 579 "/usr/share/applications/eric6_browser.desktop",
578 "/usr/share/pixmaps/eric.png", 580 "/usr/share/pixmaps/eric.png",
579 "/usr/share/pixmaps/ericWeb.png", 581 "/usr/share/pixmaps/ericWeb.png",
582 # from Python2 era
583 "/usr/share/applications/eric6_webbrowser.desktop",
580 ]: 584 ]:
581 if os.path.exists(name): 585 if os.path.exists(name):
582 os.remove(name) 586 os.remove(name)
583 elif os.getuid() >= 1000: 587 elif os.getuid() >= 1000:
584 # it is assumed that user ids start at 1000 588 # it is assumed that user ids start at 1000
592 "~/.local/share/appdata/eric6.appdata.xml", 596 "~/.local/share/appdata/eric6.appdata.xml",
593 "~/.local/share/metainfo/eric6.appdata.xml", 597 "~/.local/share/metainfo/eric6.appdata.xml",
594 "~/.local/share/applications/eric6_browser.desktop", 598 "~/.local/share/applications/eric6_browser.desktop",
595 "~/.local/share/pixmaps/eric.png", 599 "~/.local/share/pixmaps/eric.png",
596 "~/.local/share/pixmaps/ericWeb.png", 600 "~/.local/share/pixmaps/ericWeb.png",
601 # from Python2 era
602 "/usr/share/applications/eric6_webbrowser.desktop",
597 ]: 603 ]:
598 path = os.path.expanduser(name) 604 path = os.path.expanduser(name)
599 if os.path.exists(path): 605 if os.path.exists(path):
600 os.remove(path) 606 os.remove(path)
601 607
1335 1341
1336 try: 1342 try:
1337 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__ 1343 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__
1338 except ImportError as msg: 1344 except ImportError as msg:
1339 from PyQt5.QtCore import PYQT_VERSION 1345 from PyQt5.QtCore import PYQT_VERSION
1340 if PYQT_VERSION >= 0x50c00: 1346 if PYQT_VERSION >= 0x050c00:
1341 # PyQt 5.12 separated QtWebEngine into a separate wheel 1347 # PyQt 5.12 separated QtWebEngine into a separate wheel
1342 installed = pipInstall( 1348 installed = pipInstall(
1343 "PyQtWebEngine", 1349 "PyQtWebEngine",
1344 "PyQtWebEngine could not be detected.\nError: {0}" 1350 "PyQtWebEngine could not be detected.\nError: {0}"
1345 .format(msg) 1351 .format(msg)
1667 Function to generate the name of the Start Menu top entry. 1673 Function to generate the name of the Start Menu top entry.
1668 1674
1669 @return name of the Start Menu top entry 1675 @return name of the Start Menu top entry
1670 @rtype str 1676 @rtype str
1671 """ 1677 """
1672 return "eric6" 1678 majorVersion, minorVersion = sys.version_info[:2]
1679 return "eric6 (Python {0}.{1})".format(majorVersion, minorVersion)
1673 1680
1674 1681
1675 def main(argv): 1682 def main(argv):
1676 """ 1683 """
1677 The main function of the script. 1684 The main function of the script.

eric ide

mercurial