Skip to content

Commit

Permalink
Path always ends with a '/'
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Jul 12, 2024
1 parent a3127e4 commit 2f83a4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions conda_build/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -1414,9 +1414,10 @@ def check_overlinking_impl(
sysroots_files[srs] = sysroot_files

def sysroot_matches_subdir(path):
if path.endswith("/"):
path = os.path.dirname(path)
triplet = os.path.basename(os.path.dirname(path))
# The path looks like <PREFIX>/aarch64-conda-linux-gnu/sysroot/
# We check that the triplet "aarch64-conda-linux-gnu"
# matches the subdir for eg: linux-aarch64.
triplet = os.path.basename(os.path.dirname(os.path.dirname(path)))
subdir_arch = subdir.split("-")[-1]
return triplet.split("-")[0] == GNU_ARCH_MAP.get(subdir_arch, subdir_arch)

Expand Down

0 comments on commit 2f83a4c

Please sign in to comment.