Skip to content

Commit

Permalink
Merge pull request #5593 from markotoplak/remove-pyqt5-dep2
Browse files Browse the repository at this point in the history
[FIX] setup.py: do not overwrite conda's PyQt5
  • Loading branch information
markotoplak authored Sep 20, 2021
2 parents 2146396 + 816f623 commit 2088e2d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 0 additions & 2 deletions requirements-gui.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
orange-canvas-core>=0.1.21,<0.2a
orange-widget-base>=4.14.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
Expand Down
2 changes: 2 additions & 0 deletions requirements-pyqt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PyQt5>=5.12,!=5.15.1 # 5.15.1 skipped because of QTBUG-87057 - affects select columns
PyQtWebEngine>=5.12
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
except ImportError:
have_cython = False

try:
import PyQt5.QtCore # pylint: disable=unused-import
have_pyqt5 = True
except ImportError:
have_pyqt5 = False

is_conda = os.path.exists(os.path.join(sys.prefix, 'conda-meta'))

NAME = 'Orange3'

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2088e2d

Please sign in to comment.