--- setup.py 2010-06-24 21:54:59.000000000 -0400 +++ setup.py 2011-03-18 16:38:59.000478000 -0400 @@ -34,7 +34,7 @@ # -import os, sys, struct +import os, sys, struct, subprocess COPY=False DEBIAN=False @@ -55,7 +55,9 @@ for item in ['GNU_LGPL_v2', 'COPYRIGHTS']: share_dirs.append(item) - + freetype2_cflags = subprocess.check_output(['freetype-config', '--cflags']) + freetype2_include_dirs = (freetype2_cflags.replace('-I', '')).split() + pycms_src='src/pycms/' pycms_module = Extension('sk1libs.pycms._pycms', define_macros = [('MAJOR_VERSION', '1'), @@ -69,7 +71,7 @@ define_macros = [('MAJOR_VERSION', '1'), ('MINOR_VERSION', '0')], sources = [ft2_src+'ft2module.c'], - include_dirs=['/usr/include/freetype2'], + include_dirs=freetype2_include_dirs, libraries=['freetype'], extra_compile_args=["-Wall"]) @@ -93,7 +95,7 @@ define_macros = [('MAJOR_VERSION', '1'), ('MINOR_VERSION', '0')], sources = [imft_src+'_imagingft.c'], - include_dirs=['/usr/include/freetype2'], + include_dirs=freetype2_include_dirs, libraries=['freetype'], extra_compile_args=["-Wall"])