Skip to content

Commit

Permalink
Add backports
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard committed Oct 18, 2023
1 parent f280b42 commit 7527a7d
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion conda_build/os_utils/liefldd.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

from ..deprecations import deprecated
from .external import find_executable
from .pyldd import DLLfile, EXEfile, elffile, machofile

# lief cannot handle files it doesn't know about gracefully
# TODO :: Remove all use of pyldd
# Currently we verify the output of each against the other
from .pyldd import DLLfile, EXEfile, elffile, machofile
from .pyldd import codefile_type as _codefile_type
from .pyldd import inspect_linkages as inspect_linkages_pyldd

try:
Expand Down Expand Up @@ -99,6 +100,32 @@ def codefile_class(
from .pyldd import codefile_class


@deprecated(
"3.28.0",
"4.0.0",
addendum="Use `conda_build.os_utils.liefldd.codefile_class` instead.",
)
def codefile_type_liefldd(*args, **kwargs) -> str | None:
codefile = codefile_class(*args, **kwargs)
return codefile.__name__ if codefile else None


deprecated.constant(
"3.28.0",
"4.0.0",
"codefile_type_pyldd",
_codefile_type,
addendum="Use `conda_build.os_utils.pyldd.codefile_class` instead.",
)
deprecated.constant(
"3.28.0",
"4.0.0",
"codefile_type",
_codefile_type,
addendum="Use `conda_build.os_utils.liefldd.codefile_class` instead.",
)


def _trim_sysroot(sysroot):
while sysroot.endswith("/") or sysroot.endswith("\\"):
sysroot = sysroot[:-1]
Expand Down

0 comments on commit 7527a7d

Please sign in to comment.