Skip to content

Commit

Permalink
show variants
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra committed Jul 18, 2024
1 parent 70b6472 commit 79ac2ca
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions .ci_support/build_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def build_all(recipes_dir, arch):
build_folders_rattler_build(recipes_dir, platform, arch, channel_urls)


def get_config(arch, channel_urls):
def get_config(platform, arch, channel_urls):
exclusive_config_files = [os.path.join(conda.base.context.context.root_prefix,
'conda_build_config.yaml')]
script_dir = os.path.dirname(os.path.realpath(__file__))
Expand All @@ -191,10 +191,14 @@ def get_config(arch, channel_urls):
if os.path.exists(exclusive_config_file):
exclusive_config_files.append(exclusive_config_file)

config = conda_build.api.Config(
arch=arch, exclusive_config_files=exclusive_config_files,
channel_urls=channel_urls, error_overlinking=True,
)
config = conda_build.config.get_or_merge_config(
None,
exclusive_config_file=exclusive_config_files,
platform=platform,
arch=arch,
channel_urls=channel_urls
)

return config


Expand All @@ -206,8 +210,8 @@ def build_folders(recipes_dir, folders, arch, channel_urls):
index = conda.core.index.get_index(channel_urls=channel_urls)
conda_resolve = conda.resolve.Resolve(index)

config = get_config(arch, channel_urls)
platform = get_host_platform()
config = get_config(platform, arch, channel_urls)

worker = {'platform': platform, 'arch': arch,
'label': '{}-{}'.format(platform, arch)}
Expand All @@ -231,10 +235,23 @@ def build_folders(recipes_dir, folders, arch, channel_urls):
d[G.nodes[node]['meta'].meta_path] = 1

for recipe in d.keys():
conda_build.api.build([recipe], config=get_config(arch, channel_urls))
conda_build.api.build([recipe], config=get_config(platform, arch, channel_urls))


def build_folders_rattler_build(recipes_dir: str, platform, arch, channel_urls: list[str]):
config = get_config(platform, arch, channel_urls)

# Get the combined variants from normal variant locations prior to running migrations
(
combined_variant_spec,
_,
) = conda_build.variants.get_package_combined_spec(
None, config=config
)

variants = yaml.dump(sorted(combined_variant_spec))
print(f"-- VARIANTS:\n\n{variants}\n\n")

# Define the arguments for rattler-build
args = [
"rattler-build",
Expand Down

0 comments on commit 79ac2ca

Please sign in to comment.