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 going to be marked for deprecation.

refs:
- conda/conda-build#5222

Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
  • Loading branch information
mbargull committed Mar 16, 2024
1 parent 1600779 commit 354a0f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
14 changes: 2 additions & 12 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import yaml
import warnings
from collections import Counter, OrderedDict, namedtuple
from copy import deepcopy
from itertools import chain, product
from os import fspath
from pathlib import Path, PurePath
Expand All @@ -32,17 +33,10 @@
except ImportError:
import json

import conda_build.api
import conda_build.utils
import conda_build.variants
import conda_build.conda_interface
import conda_build.render
from conda.models.match_spec import MatchSpec

from copy import deepcopy
from conda.models.version import VersionOrder

import conda_build.api
import conda_build.conda_interface
import conda_build.render
import conda_build.utils
import conda_build.variants
Expand Down Expand Up @@ -2207,8 +2201,6 @@ def _load_forge_config(forge_dir, exclusive_config_file, forge_yml=None):


def get_most_recent_version(name, include_broken=False):
from conda_build.conda_interface import VersionOrder

request = requests.get(
"https://api.anaconda.org/package/conda-forge/" + name
)
Expand All @@ -2223,8 +2215,6 @@ def get_most_recent_version(name, include_broken=False):


def check_version_uptodate(name, installed_version, error_on_warn):
from conda_build.conda_interface import VersionOrder

most_recent_version = get_most_recent_version(name).version
if installed_version is None:
msg = "{} is not installed in conda-smithy's environment.".format(name)
Expand Down
4 changes: 2 additions & 2 deletions conda_smithy/lint_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
else:
import tomllib

from conda.models.version import VersionOrder
from conda_build.metadata import (
ensure_valid_license_family,
FIELDS as cbfields,
)
import conda_build.conda_interface
from conda_smithy.validate_schema import validate_json_schema

from .utils import render_meta_yaml, get_yaml
Expand Down Expand Up @@ -495,7 +495,7 @@ def lintify_meta_yaml(
if package_section.get("version") is not None:
ver = str(package_section.get("version"))
try:
conda_build.conda_interface.VersionOrder(ver)
VersionOrder(ver)
except:
lints.append(
"Package version {} doesn't match conda spec".format(ver)
Expand Down

0 comments on commit 354a0f2

Please sign in to comment.