Skip to content

Commit

Permalink
Remove conda_build.metadata._get_env_path
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed Aug 1, 2024
1 parent 5b525e3 commit 01087bb
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions conda_build/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

from . import utils
from .config import Config, get_or_merge_config
from .deprecations import deprecated
from .exceptions import (
CondaBuildException,
CondaBuildUserError,
Expand Down Expand Up @@ -55,7 +54,6 @@
)

if TYPE_CHECKING:
from pathlib import Path
from typing import Any, Literal, Self

OutputDict = dict[str, Any]
Expand Down Expand Up @@ -855,21 +853,12 @@ def build_string_from_metadata(metadata):
return build_str


@deprecated(
"24.7", "24.9", addendum="Use `conda.base.context.locate_prefix_by_name` instead."
)
def _get_env_path(
env_name_or_path: str | os.PathLike | Path,
) -> str | os.PathLike | Path:
return (
def _get_dependencies_from_environment(env_name_or_path):
path = (
env_name_or_path
if isdir(env_name_or_path)
else locate_prefix_by_name(env_name_or_path)
)


def _get_dependencies_from_environment(env_name_or_path):
path = _get_env_path(env_name_or_path)
# construct build requirements that replicate the given bootstrap environment
# and concatenate them to the build requirements from the recipe
bootstrap_metadata = get_installed_packages(path)
Expand Down

0 comments on commit 01087bb

Please sign in to comment.