config-3.py 724 B

123456789101112131415161718192021222324
  1. PYTHON_EXTENSIONS_PATHS = [
  2. LOADER_DIR
  3. ] + PYTHON_EXTENSIONS_PATHS
  4. ci_and_not_headless = False
  5. try:
  6. from .version import ci_build, headless
  7. ci_and_not_headless = ci_build and not headless
  8. except:
  9. pass
  10. # the Qt plugin is included currently only in the pre-built wheels
  11. if sys.platform.startswith("linux") and ci_and_not_headless:
  12. os.environ["QT_QPA_PLATFORM_PLUGIN_PATH"] = os.path.join(
  13. os.path.dirname(os.path.abspath(__file__)), "qt", "plugins"
  14. )
  15. # Qt will throw warning on Linux if fonts are not found
  16. if sys.platform.startswith("linux") and ci_and_not_headless:
  17. os.environ["QT_QPA_FONTDIR"] = os.path.join(
  18. os.path.dirname(os.path.abspath(__file__)), "qt", "fonts"
  19. )