From c1f13775d978c415449ca6b298e0c67adbbea79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Mon, 4 Jul 2011 12:54:34 +0200 Subject: [PATCH] setup.py now checks for Imaging directory in Python include path. Appears to fix #402 --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a5baa97..17b37c1 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ from distutils.command.build import build from distutils.command.clean import clean from distutils.command.build_ext import build_ext from distutils.dir_util import remove_tree +from distutils.sysconfig import get_python_inc from distutils import log import os, os.path import glob @@ -52,7 +53,10 @@ except AttributeError: try: pil_include = os.environ['PIL_INCLUDE_DIR'].split(os.pathsep) except: - pil_include = [] + pil_include = [ os.path.join(get_python_inc(plat_specific=1), 'Imaging') ] + if not os.path.exists(pil_include[0]): + pil_include = [ ] + # used to figure out what files to compile render_modes = ['normal', 'overlay', 'lighting', 'night', 'spawn', 'cave']