diff --git a/requirements-gui.txt b/requirements-gui.txt index 0eb8d96df49..ba664128b4a 100644 --- a/requirements-gui.txt +++ b/requirements-gui.txt @@ -1,8 +1,6 @@ orange-canvas-core>=0.1.21,<0.2a orange-widget-base>=4.13.0 -PyQt5>=5.12,!=5.15.1 # 5.15.1 skipped because of QTBUG-87057 - affects select columns -PyQtWebEngine>=5.12 AnyQt>=0.0.11 pyqtgraph>=0.11.1 diff --git a/requirements-pyqt.txt b/requirements-pyqt.txt new file mode 100644 index 00000000000..d5d33de1c55 --- /dev/null +++ b/requirements-pyqt.txt @@ -0,0 +1,2 @@ +PyQt5>=5.12,!=5.15.1 # 5.15.1 skipped because of QTBUG-87057 - affects select columns +PyQtWebEngine>=5.12 \ No newline at end of file diff --git a/setup.py b/setup.py index b56fdbcda7d..3e9b8cb8eda 100755 --- a/setup.py +++ b/setup.py @@ -34,6 +34,13 @@ except ImportError: have_cython = False +try: + import PyQt5.QtCore + have_pyqt5 = True +except ImportError: + have_pyqt5 = False + +is_conda = os.path.exists(os.path.join(sys.prefix, 'conda-meta')) NAME = 'Orange3' @@ -78,6 +85,12 @@ requirements = ['requirements-core.txt', 'requirements-gui.txt'] +# pyqt5 is named pyqt5 on pypi and pyqt on conda +# due to possible conflicts, skip the pyqt5 requirement in conda environments +# that already have pyqt +if not (is_conda and have_pyqt5): + requirements.append('requirements-pyqt.txt') + INSTALL_REQUIRES = sorted(set( line.partition('#')[0].strip() for file in (os.path.join(os.path.dirname(__file__), file)