mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Merge pull request #746 from cgohlke/patch-1
Fix build failure when compiler.include_dirs refers to nonexistent directory
This commit is contained in:
commit
8dbc00643f
7
setup.py
7
setup.py
|
@ -405,7 +405,12 @@ class pil_build_ext(build_ext):
|
|||
|
||||
# Find the best version
|
||||
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 \
|
||||
os.path.isfile(os.path.join(directory, name,
|
||||
'openjpeg.h')):
|
||||
|
|
Loading…
Reference in New Issue
Block a user