From 0eea5c04b8759b6b1aeed25c140c023933264228 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Tue, 26 Dec 2023 10:05:48 +0100 Subject: [PATCH] [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" --- .../next/Build/2023-12-25-10-06-59.gh-issue-101778.JfhRkx.rst | 2 ++ setup.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2023-12-25-10-06-59.gh-issue-101778.JfhRkx.rst 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 00000000000..3763e8404c3 --- /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 4f122b62e0e..ad8fb81b218 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