Skip to content

Commit 0eea5c0

Browse files
[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"
1 parent 4b358d7 commit 0eea5c0

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix build error when there's a dangling symlink in the directory containing
2+
``ffi.h``.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def is_macosx_sdk_path(path):
224224

225225
def grep_headers_for(function, headers):
226226
for header in headers:
227+
if not os.path.exists(header): continue
227228
with open(header, 'r', errors='surrogateescape') as f:
228229
if function in f.read():
229230
return True

0 commit comments

Comments
 (0)