Skip to content

Commit

Permalink
Stop using conda_build.conda_interface
Browse files Browse the repository at this point in the history
conda_build.conda_interface is being deprecated.

conda_build.conda_interface.get_index (which is conda.exports.get_index)
is using the conda.models.Dist -> conda.models.records.PackageRecord
mapping. Dist class is legacy code that's being phased out, so avoid it.

refs:
- conda/conda-build#5152
- conda/conda-build#5222

Signed-off-by: Marcel Bargull <[email protected]>
  • Loading branch information
mbargull committed Mar 16, 2024
1 parent 0154c60 commit 4d57150
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions build_cdt_recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import click
from ruamel.yaml import YAML

from conda_build.conda_interface import get_index
from conda.core.index import get_index

from cdt_config import (
LEGACY_CDT_PATH,
Expand Down Expand Up @@ -95,15 +95,14 @@ def _get_recipe_attrs(recipe, channel_index):
def _build_cdt_meta(recipes, dist_arch_slug):
print("getting conda-forge/label/main channel index...", flush=True)
channel_url = '/'.join(['conda-forge', 'label', 'main'])
dist_index = get_index(
[channel_url],
prepend=False,
use_cache=False
)
channel_index = {
c.to_filename(): a
for c, a in dist_index.items()
if a['subdir'] == 'noarch'
prec.fn: prec
for prec in get_index(
[channel_url],
prepend=False,
use_cache=False,
)
if prec.subdir == 'noarch'
}

cdt_meta = {}
Expand Down

0 comments on commit 4d57150

Please sign in to comment.