0

setup.py now checks for Imaging directory in Python include path. Appears to fix #402

This commit is contained in:
Maciej Małecki
2011-07-04 12:54:34 +02:00
parent 62119c37ef
commit c1f13775d9

View File

@@ -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']