10495:73ec0786d60e | 10496:f9925e08dbce |
---|---|
6 """ | 6 """ |
7 Module implementing Qt/PyQt/PySide related utility functions. | 7 Module implementing Qt/PyQt/PySide related utility functions. |
8 """ | 8 """ |
9 | 9 |
10 import contextlib | 10 import contextlib |
11 import functools | |
12 import os | 11 import os |
13 import sys | 12 import sys |
14 import sysconfig | 13 import sysconfig |
15 | 14 |
16 from PyQt6.QtCore import QT_VERSION, QDir, QLibraryInfo, QProcess | 15 from PyQt6.QtCore import QT_VERSION, QDir, QLibraryInfo, QProcess |
377 return os.path.join(dirName, toolname) | 376 return os.path.join(dirName, toolname) |
378 | 377 |
379 return toolname | 378 return toolname |
380 | 379 |
381 | 380 |
382 @functools.lru_cache() | |
383 def checkPyside(variant=2): | 381 def checkPyside(variant=2): |
384 """ | 382 """ |
385 Module function to check the presence of PySide2/PySide6. | 383 Module function to check the presence of PySide2/PySide6. |
386 | 384 |
387 @param variant indicator for the PySide variant | 385 @param variant indicator for the PySide variant |