mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-24 08:14:10 +03:00
FIX: fix error for setup.py for Python 3
The subprocess command in Python 3 returns a bytes object. If the homebrew subprocess check returns a not-empty result, then setup crashes trying to combine the bytes with the string constants with and error like "TypeError: Can't mix strings and bytes in path components."
This commit is contained in:
parent
c567c3ec89
commit
29a65c1373
4
setup.py
4
setup.py
|
@ -210,7 +210,9 @@ class pil_build_ext(build_ext):
|
|||
# if Homebrew is installed, use its lib and include directories
|
||||
import subprocess
|
||||
try:
|
||||
prefix = subprocess.check_output(['brew', '--prefix']).strip()
|
||||
prefix = subprocess.check_output(
|
||||
['brew', '--prefix']
|
||||
).strip().decode('latin1')
|
||||
except:
|
||||
# Homebrew not installed
|
||||
prefix = None
|
||||
|
|
Loading…
Reference in New Issue
Block a user