Skip to content

Commit 2088e2d

Browse files
authored
Merge pull request #5593 from markotoplak/remove-pyqt5-dep2
[FIX] setup.py: do not overwrite conda's PyQt5
2 parents 2146396 + 816f623 commit 2088e2d

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

requirements-gui.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
orange-canvas-core>=0.1.21,<0.2a
22
orange-widget-base>=4.14.0
33

4-
PyQt5>=5.12,!=5.15.1 # 5.15.1 skipped because of QTBUG-87057 - affects select columns
5-
PyQtWebEngine>=5.12
64
AnyQt>=0.0.11
75

86
pyqtgraph>=0.11.1

requirements-pyqt.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PyQt5>=5.12,!=5.15.1 # 5.15.1 skipped because of QTBUG-87057 - affects select columns
2+
PyQtWebEngine>=5.12

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
except ImportError:
3535
have_cython = False
3636

37+
try:
38+
import PyQt5.QtCore # pylint: disable=unused-import
39+
have_pyqt5 = True
40+
except ImportError:
41+
have_pyqt5 = False
42+
43+
is_conda = os.path.exists(os.path.join(sys.prefix, 'conda-meta'))
3744

3845
NAME = 'Orange3'
3946

@@ -78,6 +85,12 @@
7885

7986
requirements = ['requirements-core.txt', 'requirements-gui.txt']
8087

88+
# pyqt5 is named pyqt5 on pypi and pyqt on conda
89+
# due to possible conflicts, skip the pyqt5 requirement in conda environments
90+
# that already have pyqt
91+
if not (is_conda and have_pyqt5):
92+
requirements.append('requirements-pyqt.txt')
93+
8194
INSTALL_REQUIRES = sorted(set(
8295
line.partition('#')[0].strip()
8396
for file in (os.path.join(os.path.dirname(__file__), file)

0 commit comments

Comments
 (0)