1451 """ |
1451 """ |
1452 Perform some dependency checks. |
1452 Perform some dependency checks. |
1453 """ |
1453 """ |
1454 global verbose |
1454 global verbose |
1455 |
1455 |
1456 # TODO: update as necessary for PyQt6 6.2.0 |
|
1457 requiredVersions = { |
1456 requiredVersions = { |
1458 "pyqt6": 0x60101, |
1457 "pyqt6": 0x60200, # v6.2.0 |
1459 "pyqt6-charts": 0x60101, |
1458 "pyqt6-charts": 0x60200, # v6.2.0 |
1460 "pyqt6-webengine": 0x60200, |
1459 "pyqt6-webengine": 0x60200, # v6.2.0 |
1461 "pyqt6-qscintilla": 0x20d00, |
1460 "pyqt6-qscintilla": 0x20d00, # v2.13.0 |
1462 "sip": 0x60100, |
1461 "sip": 0x60100, # v6.1.0 |
1463 } |
1462 } |
1464 |
1463 |
1465 try: |
1464 try: |
1466 isSudo = os.getuid() == 0 and sys.platform != "darwin" |
1465 isSudo = os.getuid() == 0 and sys.platform != "darwin" |
1467 # disregard sudo installs on macOS |
1466 # disregard sudo installs on macOS |
1525 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ |
1524 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ |
1526 except ImportError as err: |
1525 except ImportError as err: |
1527 if isSudo: |
1526 if isSudo: |
1528 print("Optional 'PyQt6-WebEngine' could not be detected.") |
1527 print("Optional 'PyQt6-WebEngine' could not be detected.") |
1529 else: |
1528 else: |
1530 # TODO: should PyQt6-WebEngine be a must requirement? |
|
1531 msg = ( |
1529 msg = ( |
1532 "Optional 'PyQt6-WebEngine' could not be detected.{0}" |
1530 "Optional 'PyQt6-WebEngine' could not be detected.{0}" |
1533 .format("\nError: {0}".format(err) if verbose else "") |
1531 .format("\nError: {0}".format(err) if verbose else "") |
1534 ) |
1532 ) |
1535 pipInstall( |
1533 pipInstall( |