mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
[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"
This commit is contained in:
parent
4b358d754c
commit
0eea5c04b8
2 changed files with 3 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
Fix build error when there's a dangling symlink in the directory containing
|
||||
``ffi.h``.
|
1
setup.py
1
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue