From: Ronald Oussoren Date: Tue, 26 Dec 2023 09:05:48 +0000 (+0100) Subject: [3.11] gh-101778: Fix build error when there's a dangling symlink in the directory... X-Git-Tag: v3.11.8~220 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0eea5c04b8759b6b1aeed25c140c023933264228;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-101778: Fix build error when there's a dangling symlink in the directory containing "ffi.h" (#113466) gh-101778: Fix build error when there's a dangling symlink in the directory containing "ffi.h" --- diff --git a/Misc/NEWS.d/next/Build/2023-12-25-10-06-59.gh-issue-101778.JfhRkx.rst b/Misc/NEWS.d/next/Build/2023-12-25-10-06-59.gh-issue-101778.JfhRkx.rst new file mode 100644 index 000000000000..3763e8404c35 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2023-12-25-10-06-59.gh-issue-101778.JfhRkx.rst @@ -0,0 +1,2 @@ +Fix build error when there's a dangling symlink in the directory containing +``ffi.h``. diff --git a/setup.py b/setup.py index 4f122b62e0e7..ad8fb81b218e 100644 --- a/setup.py +++ b/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