src/eric7/SystemUtilities/PySideImporter.py

Sat, 26 Apr 2025 12:34:32 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Apr 2025 12:34:32 +0200
branch
eric7
changeset 11240
c48c615c04a3
parent 11216
a1471981ef18
permissions
-rw-r--r--

MicroPython
- Added a configuration option to disable the support for the no longer produced Pimoroni Pico Wireless Pack.

# -*- coding: utf-8 -*-

# Copyright (c) 2011 - 2025 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module to check for the presence of PySide by importing it.
"""

import importlib.util
import sys

if __name__ == "__main__":
    pySideVariant = "6"
    if len(sys.argv) == 2:
        pySideVariant = sys.argv[1].replace("--variant=", "")

    if pySideVariant in ("1", "2"):
        # no PySide support anymore
        ret = 10

    elif pySideVariant == "6":
        ret = 10 if importlib.util.find_spec("PySide6") is None else 0

    else:
        ret = 10

    sys.exit(ret)

eric ide

mercurial