Skip to content

Commit

Permalink
Remove is_linked usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed Nov 3, 2023
1 parent 04ca48d commit f204147
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion conda_build/conda_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
human_bytes,
input,
install_actions,
is_linked,
lchmod,
linked,
linked_data,
Expand Down
10 changes: 7 additions & 3 deletions conda_build/inspect_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
from conda.core.prefix_data import PrefixData
from conda.models.dist import Dist
from conda.models.records import PrefixRecord
from conda.resolve import MatchSpec

from conda_build.conda_interface import (
display_actions,
get_index,
install_actions,
is_linked,
linked_data,
specs_from_args,
)
Expand All @@ -49,8 +49,12 @@
@deprecated("3.28.0", "4.0.0")
@lru_cache(maxsize=None)
def dist_files(prefix: str | os.PathLike | Path, dist: Dist) -> set[str]:
meta = is_linked(prefix, dist)
return set(meta["files"]) if meta else set()
if (prec := PrefixData(prefix).get(dist.name, None)) is None:
return set()
elif MatchSpec(dist).match(prec):
return set(prec["files"])
else:
return set()


@deprecated.argument("3.28.0", "4.0.0", "avoid_canonical_channel_name")
Expand Down

0 comments on commit f204147

Please sign in to comment.