From 5a445ff70930d0893c41d2bbf3d32a1e6c52a2ef Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 7 Jul 2010 06:16:22 +0000 Subject: [PATCH] check for python development headers --- SConstruct | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 6e0248fa8..3b7b8c7e5 100644 --- a/SConstruct +++ b/SConstruct @@ -1087,7 +1087,13 @@ if not preconfigured: env['PYTHON_INSTALL_LOCATION'] = env['DESTDIR'] + '/' + env['PYTHON_SITE_PACKAGES'] majver, minver = env['PYTHON_VERSION'].split('.') - + + # TODO - this needs to be moved up... + env.AppendUnique(CPPPATH = env['PYTHON_INCLUDES']) + if not conf.CheckHeader(header='Python.h',language='C'): + color_print(1,'Could not find required header files for the Python language (version %s)' % env['PYTHON_VERSION']) + env['MISSING_DEPS'].append('python %s development headers' % env['PYTHON_VERSION']) + if (int(majver), int(minver)) < (2, 2): color_print(1,"Python version 2.2 or greater required") Exit(1) @@ -1195,7 +1201,7 @@ if not HELP_REQUESTED: # Build the pgsql2psqlite app if requested if env['PGSQL2SQLITE']: SConscript('utils/pgsql2sqlite/SConscript') - + # Build shapeindex and remove its dependency from the LIBS if 'boost_program_options%s' % env['BOOST_APPEND'] in env['LIBS']: SConscript('utils/shapeindex/SConscript')