scripts/install.py

branch
eric7
changeset 8386
41a27cbdb5c1
parent 8366
2a9f5153c438
child 8387
a68072a69dfc
equal deleted inserted replaced
8385:a578b45eb13e 8386:41a27cbdb5c1
1615 elif sys.platform.startswith("linux"): 1615 elif sys.platform.startswith("linux"):
1616 PlatformBlackLists = PlatformsBlackLists["linux"] 1616 PlatformBlackLists = PlatformsBlackLists["linux"]
1617 else: 1617 else:
1618 PlatformBlackLists = PlatformsBlackLists["mac"] 1618 PlatformBlackLists = PlatformsBlackLists["mac"]
1619 1619
1620 print("\nVersion Information")
1621 print("-------------------")
1622
1620 # check version of Qt 1623 # check version of Qt
1621 qtMajor = int(qVersion().split('.')[0]) 1624 qtMajor = int(qVersion().split('.')[0])
1622 qtMinor = int(qVersion().split('.')[1]) 1625 qtMinor = int(qVersion().split('.')[1])
1623 print("Qt Version: {0}".format(qVersion().strip())) 1626 print("Qt6: {0}".format(qVersion().strip()))
1624 if qtMajor == 6 and qtMinor < 1: 1627 if qtMajor == 6 and qtMinor < 1:
1625 print('Sorry, you must have Qt version 6.1.0 or better.') 1628 print('Sorry, you must have Qt version 6.1.0 or better.')
1626 exit(2) 1629 exit(2)
1627 1630
1628 # check version of sip 1631 # check version of sip
1630 try: 1633 try:
1631 from PyQt6 import sip 1634 from PyQt6 import sip
1632 except ImportError: 1635 except ImportError:
1633 import sip 1636 import sip
1634 sipVersion = sip.SIP_VERSION_STR 1637 sipVersion = sip.SIP_VERSION_STR
1635 print("sip Version:", sipVersion.strip()) 1638 print("sip:", sipVersion.strip())
1636 # always assume, that snapshots or dev versions are new enough 1639 # always assume, that snapshots or dev versions are new enough
1637 if "snapshot" not in sipVersion and "dev" not in sipVersion: 1640 if "snapshot" not in sipVersion and "dev" not in sipVersion:
1638 while sipVersion.count('.') < 2: 1641 while sipVersion.count('.') < 2:
1639 sipVersion += '.0' 1642 sipVersion += '.0'
1640 (major, minor, pat) = sipVersion.split('.')[:3] 1643 (major, minor, pat) = sipVersion.split('.')[:3]
1659 exit(3) 1662 exit(3)
1660 1663
1661 # check version of PyQt 1664 # check version of PyQt
1662 from PyQt6.QtCore import PYQT_VERSION_STR 1665 from PyQt6.QtCore import PYQT_VERSION_STR
1663 pyqtVersion = PYQT_VERSION_STR 1666 pyqtVersion = PYQT_VERSION_STR
1664 print("PyQt Version:", pyqtVersion.strip()) 1667 print("PyQt6:", pyqtVersion.strip())
1665 # always assume, that snapshots or dev versions are new enough 1668 # always assume, that snapshots or dev versions are new enough
1666 if "snapshot" not in pyqtVersion and "dev" not in pyqtVersion: 1669 if "snapshot" not in pyqtVersion and "dev" not in pyqtVersion:
1667 while pyqtVersion.count('.') < 2: 1670 while pyqtVersion.count('.') < 2:
1668 pyqtVersion += '.0' 1671 pyqtVersion += '.0'
1669 (major, minor, pat) = pyqtVersion.split('.')[:3] 1672 (major, minor, pat) = pyqtVersion.split('.')[:3]
1683 exit(4) 1686 exit(4)
1684 1687
1685 # check version of QScintilla 1688 # check version of QScintilla
1686 from PyQt6.Qsci import QSCINTILLA_VERSION_STR 1689 from PyQt6.Qsci import QSCINTILLA_VERSION_STR
1687 scintillaVersion = QSCINTILLA_VERSION_STR 1690 scintillaVersion = QSCINTILLA_VERSION_STR
1688 print("PyQt6-QScintilla Version:", QSCINTILLA_VERSION_STR.strip()) 1691 print("PyQt6-QScintilla:", QSCINTILLA_VERSION_STR.strip())
1689 # always assume, that snapshots or dev versions are new enough 1692 # always assume, that snapshots or dev versions are new enough
1690 if "snapshot" not in scintillaVersion and "dev" not in scintillaVersion: 1693 if "snapshot" not in scintillaVersion and "dev" not in scintillaVersion:
1691 while scintillaVersion.count('.') < 2: 1694 while scintillaVersion.count('.') < 2:
1692 scintillaVersion += '.0' 1695 scintillaVersion += '.0'
1693 (major, minor, pat) = scintillaVersion.split('.')[:3] 1696 (major, minor, pat) = scintillaVersion.split('.')[:3]
1721 with contextlib.suppress(NameError, AttributeError): 1724 with contextlib.suppress(NameError, AttributeError):
1722 print("PyQt6-Charts:", QtCharts.PYQT_CHART_VERSION_STR) 1725 print("PyQt6-Charts:", QtCharts.PYQT_CHART_VERSION_STR)
1723 1726
1724 with contextlib.suppress(ImportError, AttributeError): 1727 with contextlib.suppress(ImportError, AttributeError):
1725 from PyQt6 import QtWebEngine 1728 from PyQt6 import QtWebEngine
1726 print("PyQt6-WebEngine.", QtWebEngine.PYQT_WEBENGINE_VERSION_STR) 1729 print("PyQt6-WebEngine:", QtWebEngine.PYQT_WEBENGINE_VERSION_STR)
1727 1730
1728 print("All dependencies ok.") 1731 print("All dependencies ok.")
1729 print() 1732 print()
1730 1733
1731 1734

eric ide

mercurial