setup.py now checks for Imaging directory in Python include path. Appears to fix #402
This commit is contained in:
4
setup.py
4
setup.py
@@ -3,6 +3,7 @@ from distutils.command.build import build
|
|||||||
from distutils.command.clean import clean
|
from distutils.command.clean import clean
|
||||||
from distutils.command.build_ext import build_ext
|
from distutils.command.build_ext import build_ext
|
||||||
from distutils.dir_util import remove_tree
|
from distutils.dir_util import remove_tree
|
||||||
|
from distutils.sysconfig import get_python_inc
|
||||||
from distutils import log
|
from distutils import log
|
||||||
import os, os.path
|
import os, os.path
|
||||||
import glob
|
import glob
|
||||||
@@ -52,8 +53,11 @@ except AttributeError:
|
|||||||
try:
|
try:
|
||||||
pil_include = os.environ['PIL_INCLUDE_DIR'].split(os.pathsep)
|
pil_include = os.environ['PIL_INCLUDE_DIR'].split(os.pathsep)
|
||||||
except:
|
except:
|
||||||
|
pil_include = [ os.path.join(get_python_inc(plat_specific=1), 'Imaging') ]
|
||||||
|
if not os.path.exists(pil_include[0]):
|
||||||
pil_include = [ ]
|
pil_include = [ ]
|
||||||
|
|
||||||
|
|
||||||
# used to figure out what files to compile
|
# used to figure out what files to compile
|
||||||
render_modes = ['normal', 'overlay', 'lighting', 'night', 'spawn', 'cave']
|
render_modes = ['normal', 'overlay', 'lighting', 'night', 'spawn', 'cave']
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user