diff --git a/installers-conda/build_conda_pkgs.py b/installers-conda/build_conda_pkgs.py index e777777f868..7b9c7d8b716 100644 --- a/installers-conda/build_conda_pkgs.py +++ b/installers-conda/build_conda_pkgs.py @@ -271,27 +271,55 @@ def _patch_source(self): def patch_recipe(self): # Get current Spyder requirements - current_requirements = ['python'] - current_requirements += yaml.load( + spyder_base_reqs = ['python'] + spyder_base_reqs += yaml.load( REQ_MAIN.read_text())['dependencies'] if os.name == 'nt': win_requirements = yaml.load( REQ_WINDOWS.read_text())['dependencies'] - current_requirements += win_requirements - current_requirements.append('ptyprocess >=0.5') + spyder_base_reqs += win_requirements + spyder_base_reqs.append('ptyprocess >=0.5') elif sys.platform == 'darwin': mac_requirements = yaml.load( REQ_MAC.read_text())['dependencies'] if 'python.app' in mac_requirements: mac_requirements.remove('python.app') - current_requirements += mac_requirements + spyder_base_reqs += mac_requirements else: linux_requirements = yaml.load( REQ_LINUX.read_text())['dependencies'] - current_requirements += linux_requirements + spyder_base_reqs += linux_requirements + + spyder_reqs = [f"spyder-base =={self.version}"] + for req in spyder_base_reqs.copy(): + if req.startswith(('pyqt ', 'pyqtwebengine ', 'qtconsole ')): + spyder_reqs.append(req) + spyder_base_reqs.remove(req) + + if req.startswith('qtconsole '): + spyder_base_reqs.append( + req.replace('qtconsole', 'qtconsole-base') + ) self.recipe_clobber.update({ - "requirements": {"run": current_requirements} + "requirements": {"run": spyder_base_reqs}, + # Since outputs is a list, the entire list must be reproduced with + # the current run requirements + "outputs": [ + { + "name": "spyder-base" + }, + { + "name": "spyder", + "build": {"noarch": "python"}, + "requirements": {"run": spyder_reqs}, + "test": { + "requires": ["pip"], + "commands": ["spyder -h", "python -m pip check"], + "imports": ["spyder"] + } + } + ] }) super().patch_recipe()