From 203f784eb600236ba8ceb134f620af926a83a738 Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:02:03 -0800 Subject: [PATCH] Add 'none' to qt_requirements. This will accommodate the package split. --- setup.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index bde2452a44d..2ec8b79ee0f 100644 --- a/setup.py +++ b/setup.py @@ -244,8 +244,20 @@ def run(self): # Qt bindings requirements qt_requirements = { - 'pyqt5': ['pyqt5>=5.15,<5.16', 'pyqtwebengine>=5.15,<5.16', 'pyqt5-sip<12.16; python_version=="3.8"'], - 'pyqt6': ['pyqt6>=6.5,<7', 'pyqt6-webengine>=6.5,<7'], + 'pyqt5': [ + 'pyqt5>=5.15,<5.16', + 'pyqt5-sip<12.16; python_version=="3.8"', + 'pyqtwebengine>=5.15,<5.16', + 'qtconsole>=5.6.1,<5.7.0', + ], + 'pyqt6': [ + 'pyqt6>=6.5,<7', + 'pyqt6-webengine>=6.5,<7', + 'qtconsole>=5.6.1,<5.7.0', + ], + 'none': [ + 'qtconsole-base>=5.6.1,<5.7.0', + ] } # Get the proper requirements for the selected Qt binding @@ -289,7 +301,6 @@ def run(self): 'qdarkstyle>=3.2.0,<3.3.0', 'qstylizer>=0.2.2', 'qtawesome>=1.3.1,<1.4.0', - 'qtconsole>=5.6.1,<5.7.0', 'qtpy>=2.4.0', 'rtree>=0.9.7', 'setuptools>=49.6.0', @@ -304,11 +315,20 @@ def run(self): # Loosen constraints to ensure dev versions still work if 'dev' in __version__: - reqs_to_loosen = {'python-lsp-server[all]', 'qtconsole', 'spyder-kernels'} + reqs_to_loosen = { + 'python-lsp-server[all]', + 'qtconsole', + 'qtconsole-base', + 'spyder-kernels', + } install_requires = [req for req in install_requires if req.split(">")[0] not in reqs_to_loosen] + install_requires.append('python-lsp-server[all]>=1.12.0,<1.14.0') - install_requires.append('qtconsole>=5.5.1,<5.7.0') + base = '' + if os.getenv('SPYDER_QT_BINDING', 'pyqt5').lower() == 'none': + base = '-base' + install_requires.append(f'qtconsole{base}>=5.5.1,<5.7.0') extras_require = { 'test:platform_system == "Windows"': ['pywin32'],