mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 01:04:29 +03:00
Merge pull request #86 from cgohlke/patch-7
Fix AttributeError: 'module' object has no attribute 'spawn'
This commit is contained in:
commit
f810a458ad
|
@ -35,13 +35,13 @@ field = re.compile(r"^%[%!\w]([^:]*)[ \t]*$")
|
||||||
|
|
||||||
gs_windows_binary = None
|
gs_windows_binary = None
|
||||||
import sys
|
import sys
|
||||||
if sys.platform[:3].lower() == 'win':
|
if sys.platform.startswith('win'):
|
||||||
import shutil
|
import shutil
|
||||||
if hasattr(shutil, 'which'):
|
if hasattr(shutil, 'which'):
|
||||||
which = shutil.which
|
which = shutil.which
|
||||||
else:
|
else:
|
||||||
# Python < 3.3
|
# Python < 3.3
|
||||||
import distutils
|
import distutils.spawn
|
||||||
which = distutils.spawn.find_executable
|
which = distutils.spawn.find_executable
|
||||||
for binary in ('gswin32c', 'gswin64c', 'gs'):
|
for binary in ('gswin32c', 'gswin64c', 'gs'):
|
||||||
if which(binary) is not None:
|
if which(binary) is not None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user