Stop dangling symlinks in the include dir from breaking the build. https://github.com/python/cpython/pull/113466 diff --git a/setup.py b/setup.py index 4f122b62e0e708..ad8fb81b218ebd 100644 --- setup.py +++ setup.py @@ -224,6 +224,7 @@ def is_macosx_sdk_path(path): def grep_headers_for(function, headers): for header in headers: + if not os.path.exists(header): continue with open(header, 'r', errors='surrogateescape') as f: if function in f.read(): return True