@@ -178,7 +178,7 @@ def build_all(recipes_dir, arch):
178
178
build_folders_rattler_build (recipes_dir , platform , arch , channel_urls )
179
179
180
180
181
- def get_config (arch , channel_urls ):
181
+ def get_config (platform , arch , channel_urls ):
182
182
exclusive_config_files = [os .path .join (conda .base .context .context .root_prefix ,
183
183
'conda_build_config.yaml' )]
184
184
script_dir = os .path .dirname (os .path .realpath (__file__ ))
@@ -191,10 +191,14 @@ def get_config(arch, channel_urls):
191
191
if os .path .exists (exclusive_config_file ):
192
192
exclusive_config_files .append (exclusive_config_file )
193
193
194
- config = conda_build .api .Config (
195
- arch = arch , exclusive_config_files = exclusive_config_files ,
196
- channel_urls = channel_urls , error_overlinking = True ,
197
- )
194
+ config = conda_build .config .get_or_merge_config (
195
+ None ,
196
+ exclusive_config_file = exclusive_config_files ,
197
+ platform = platform ,
198
+ arch = arch ,
199
+ channel_urls = channel_urls
200
+ )
201
+
198
202
return config
199
203
200
204
@@ -206,8 +210,8 @@ def build_folders(recipes_dir, folders, arch, channel_urls):
206
210
index = conda .core .index .get_index (channel_urls = channel_urls )
207
211
conda_resolve = conda .resolve .Resolve (index )
208
212
209
- config = get_config (arch , channel_urls )
210
213
platform = get_host_platform ()
214
+ config = get_config (platform , arch , channel_urls )
211
215
212
216
worker = {'platform' : platform , 'arch' : arch ,
213
217
'label' : '{}-{}' .format (platform , arch )}
@@ -231,10 +235,23 @@ def build_folders(recipes_dir, folders, arch, channel_urls):
231
235
d [G .nodes [node ]['meta' ].meta_path ] = 1
232
236
233
237
for recipe in d .keys ():
234
- conda_build .api .build ([recipe ], config = get_config (arch , channel_urls ))
238
+ conda_build .api .build ([recipe ], config = get_config (platform , arch , channel_urls ))
235
239
236
240
237
241
def build_folders_rattler_build (recipes_dir : str , platform , arch , channel_urls : list [str ]):
242
+ config = get_config (platform , arch , channel_urls )
243
+
244
+ # Get the combined variants from normal variant locations prior to running migrations
245
+ (
246
+ combined_variant_spec ,
247
+ _ ,
248
+ ) = conda_build .variants .get_package_combined_spec (
249
+ None , config = config
250
+ )
251
+
252
+ variants = yaml .dump (sorted (combined_variant_spec ))
253
+ print (f"-- VARIANTS:\n \n { variants } \n \n " )
254
+
238
255
# Define the arguments for rattler-build
239
256
args = [
240
257
"rattler-build" ,
0 commit comments