diff --git a/conda_build/os_utils/liefldd.py b/conda_build/os_utils/liefldd.py index 863ba7ff32..26a768a4f6 100644 --- a/conda_build/os_utils/liefldd.py +++ b/conda_build/os_utils/liefldd.py @@ -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: @@ -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]