mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
build: added option to add PyQt6/PyQt5/PySide2/PySide6 as qt distribution with PyQt6 as default
This commit is contained in:
29
setup.py
29
setup.py
@ -2,9 +2,34 @@ from setuptools import setup
|
||||
|
||||
__version__ = "0.31.0"
|
||||
|
||||
# Default to PyQt6 if no other Qt binding is installed
|
||||
qt_dependency = "PyQt6>=6.0"
|
||||
try:
|
||||
import PyQt5
|
||||
except ImportError:
|
||||
try:
|
||||
import PySide2
|
||||
except ImportError:
|
||||
try:
|
||||
import PySide6
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
qt_dependency = "PySide6>=6.0"
|
||||
else:
|
||||
qt_dependency = "PySide2>=5.9"
|
||||
else:
|
||||
qt_dependency = "PyQt5>=5.9"
|
||||
|
||||
if __name__ == "__main__":
|
||||
setup(
|
||||
install_requires=["pydantic", "PyQt6>=6.0", "qtpy", "pyqtgraph", "bec_lib", "zmq", "h5py"],
|
||||
extras_require={"dev": ["pytest", "pytest-random-order", "coverage", "pytest-qt", "black"]},
|
||||
install_requires=["pydantic", qt_dependency, "qtpy", "pyqtgraph", "bec_lib", "zmq", "h5py"],
|
||||
extras_require={
|
||||
"dev": ["pytest", "pytest-random-order", "coverage", "pytest-qt", "black"],
|
||||
"pyqt5": ["PyQt5>=5.9"],
|
||||
"pyqt6": ["PyQt6>=6.0"],
|
||||
"pyside2": ["PySide2>=5.9"],
|
||||
"pyside6": ["PySide6>=6.0"],
|
||||
},
|
||||
version=__version__,
|
||||
)
|
||||
|
Reference in New Issue
Block a user