66"""
77
88import os
9- from logging import getLogger
9+ from logging import Logger , getLogger
1010from pathlib import Path
1111from typing import Any
1212
@@ -83,8 +83,10 @@ def _install_dependencies(self, *, update: bool = False) -> None:
8383 raise ProviderInstallationError ('conan' , f'Failed to prepare { operation } environment: { e } ' , e ) from e
8484
8585 try :
86- # Install dependencies using conan install command
87- self ._run_conan_install (conanfile_path , update , logger )
86+ build_types = ['Release' , 'Debug' ]
87+ for build_type in build_types :
88+ logger .info ('Installing dependencies for build type: %s' , build_type )
89+ self ._run_conan_install (conanfile_path , update , logger , build_type )
8890 except Exception as e :
8991 raise ProviderInstallationError ('conan' , f'Failed to install dependencies: { e } ' , e ) from e
9092
@@ -125,12 +127,13 @@ def _ensure_default_profiles(self) -> None:
125127 # If profiles don't exist, create them using profile detect
126128 self ._conan_api .command .run (['profile' , 'detect' ])
127129
128- def _run_conan_install (self , conanfile_path : Path , update : bool , logger ) -> None :
129- """Run conan install command using Conan API.
130+ def _run_conan_install (self , conanfile_path : Path , update : bool , build_type : str , logger : Logger ) -> None :
131+ """Run conan install command using Conan API with optional build type .
130132
131133 Args:
132134 conanfile_path: Path to the conanfile.py
133135 update: Whether to check for updates
136+ build_type: Build type (Release, Debug, etc.) or None for default
134137 logger: Logger instance
135138 """
136139 # Build conan install command arguments
@@ -143,6 +146,10 @@ def _run_conan_install(self, conanfile_path: Path, update: bool, logger) -> None
143146 if update :
144147 command_args .append ('--update' )
145148
149+ # Add build type setting if specified
150+ if build_type :
151+ command_args .extend (['-s' , f'build_type={ build_type } ' ])
152+
146153 # Add output folder
147154 build_path = self .core_data .cppython_data .build_path
148155 command_args .extend (['--output-folder' , str (build_path )])
0 commit comments