Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] setup.py: do not overwrite conda's PyQt5 #5593

Merged
merged 1 commit into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.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
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