diff --git a/setup.py b/setup.py index 69bd42e85d4..d71f6a1beb7 100755 --- a/setup.py +++ b/setup.py @@ -806,10 +806,12 @@ def _check_ld_config(lib: str) -> str: if not path: continue - print(path) - print(lib) - retval = next((fname.strip() for fname in reversed(os.listdir(path)) - if lib in fname), "") + try: + + retval = next((fname.strip() for fname in reversed(os.listdir(path)) + if lib in fname), "") + except: + raise ValueError(f"path {path}, lib {lib}") if retval: break