mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-23 19:44:13 +03:00
Fix build failure when compiler.include_dirs refers to nonexistent directory
This commit is contained in:
parent
2633408dc3
commit
526ac7e278
7
setup.py
7
setup.py
|
@ -405,7 +405,12 @@ class pil_build_ext(build_ext):
|
||||||
|
|
||||||
# Find the best version
|
# Find the best version
|
||||||
for directory in self.compiler.include_dirs:
|
for directory in self.compiler.include_dirs:
|
||||||
for name in os.listdir(directory):
|
try:
|
||||||
|
listdir = os.listdir(directory)
|
||||||
|
except Exception:
|
||||||
|
# WindowsError, FileNotFoundError
|
||||||
|
continue
|
||||||
|
for name in listdir:
|
||||||
if name.startswith('openjpeg-') and \
|
if name.startswith('openjpeg-') and \
|
||||||
os.path.isfile(os.path.join(directory, name,
|
os.path.isfile(os.path.join(directory, name,
|
||||||
'openjpeg.h')):
|
'openjpeg.h')):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user