--- /home/jklug/3.17/old/SConstruct 2016-12-19 14:53:02.406689189 -0600 +++ ./SConstruct 2016-12-19 17:27:27.594669617 -0600 @@ -1341,6 +1341,10 @@ python_config['BASECFLAGS'] += ' -coverage' python_config['LDFLAGS'] += ' -coverage' python_config['LDSHARED'] += ' -coverage' + if env['sysroot']: + print "Prefixing includepy '%s' with sysroot prefix" % python_config['INCLUDEPY'] + python_config['INCLUDEPY'] = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], python_config['INCLUDEPY'])) + print "Python Include: '%s'" % python_config['INCLUDEPY'] # in case CC/CXX was set to the scan-build wrapper, # ensure that we build the python modules with scan-build, too if env['CC'] is None or env['CC'].find('scan-build') < 0: