RF: patch for python 3 / windows

This commit is contained in:
Matthew Brett 2014-06-28 19:33:55 +01:00
parent 43d9322b4b
commit 17760efefb
2 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,8 @@ install:
- get_python_environment macpython $VERSION venv - get_python_environment macpython $VERSION venv
- pip install delocate - pip install delocate
- cd Pillow - cd Pillow
# Needs patch for python3 / homebrew detection
- patch -p1 < ../pillow.patch
- python setup.py bdist_wheel - python setup.py bdist_wheel
- delocate-wheel dist/*.whl - delocate-wheel dist/*.whl
- pip install dist/*.whl - pip install dist/*.whl

13
pillow.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/setup.py b/setup.py
index 1a31a89..b21f975 100644
--- a/setup.py
+++ b/setup.py
@@ -212,7 +212,7 @@ 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