@@ -114,11 +114,25 @@ def deny_profile_and_path(profile: str, profile_path: str) -> None:
114
114
@click .option ("-E" , "--preserve-env" , is_flag = True , help = "Preserve user environment." )
115
115
@click .option (
116
116
"-o" ,
117
+ "--conan-arg" ,
118
+ type = click .STRING ,
119
+ multiple = True ,
120
+ help = "Arguments to pass to Conan for virtualrunenv generation" ,
121
+ )
122
+ @click .option (
123
+ "-o:o" ,
117
124
"--conan-option" ,
118
125
type = click .STRING ,
119
126
multiple = True ,
120
127
help = "Options to pass to Conan for virtualrunenv generation" ,
121
128
)
129
+ @click .option (
130
+ "-o:s" ,
131
+ "--conan-setting" ,
132
+ type = click .STRING ,
133
+ multiple = True ,
134
+ help = "Settings to pass to Conan for virtualrunenv generation" ,
135
+ )
122
136
@click .option (
123
137
"-e" ,
124
138
"--override-env" ,
@@ -134,7 +148,9 @@ def cli_exec(
134
148
profile_path : str ,
135
149
preserve_env : bool ,
136
150
override_env : List [str ],
151
+ conan_arg : List [str ],
137
152
conan_option : List [str ],
153
+ conan_setting : List [str ],
138
154
cache : bool ,
139
155
debug : bool ,
140
156
) -> None :
@@ -146,7 +162,9 @@ def cli_exec(
146
162
conf = Configuration (profile )
147
163
engine = Engine (conf , conanfile = profile_path )
148
164
engine .preserve_env = preserve_env
165
+ engine .conan_args = conan_arg
149
166
engine .conan_options = conan_option
167
+ engine .conan_settings = conan_setting
150
168
151
169
# Prepare environment overrides:
152
170
overrides = {}
@@ -175,11 +193,25 @@ def cli_exec(
175
193
@click .option ("-E" , "--preserve-env" , is_flag = True , help = "Preserve user environment." )
176
194
@click .option (
177
195
"-o" ,
196
+ "--conan-arg" ,
197
+ type = click .STRING ,
198
+ multiple = True ,
199
+ help = "Arguments to pass to Conan for virtualrunenv generation" ,
200
+ )
201
+ @click .option (
202
+ "-o:o" ,
178
203
"--conan-option" ,
179
204
type = click .STRING ,
180
205
multiple = True ,
181
206
help = "Options to pass to Conan for virtualrunenv generation" ,
182
207
)
208
+ @click .option (
209
+ "-o:s" ,
210
+ "--conan-setting" ,
211
+ type = click .STRING ,
212
+ multiple = True ,
213
+ help = "Settings to pass to Conan for virtualrunenv generation" ,
214
+ )
183
215
@click .argument ("shell_args" , nargs = - 1 )
184
216
@click .pass_obj
185
217
def cli_shell (
@@ -188,15 +220,19 @@ def cli_shell(
188
220
profile : str ,
189
221
profile_path : str ,
190
222
preserve_env : bool ,
223
+ conan_arg : List [str ],
191
224
conan_option : List [str ],
225
+ conan_setting : List [str ],
192
226
cache : bool ,
193
227
) -> None :
194
228
"""Launch shell with the correct environment from a profile."""
195
229
deny_profile_and_path (profile , profile_path )
196
230
conf = Configuration (profile )
197
231
engine = Engine (conf , conanfile = profile_path )
198
232
engine .preserve_env = preserve_env
233
+ engine .conan_args = conan_arg
199
234
engine .conan_options = conan_option
235
+ engine .conan_settings = conan_setting
200
236
201
237
# Replace process with shell.
202
238
engine .shell (shell_args , use_cache = cache )
0 commit comments