1
0

python-config.patch 869 B

123456789101112131415161718192021
  1. --- python2.7-config.orig 2013-12-11 12:40:37.244519764 +0100
  2. +++ python2.7-config 2013-12-11 12:41:43.279093075 +0100
  3. @@ -3,6 +3,7 @@
  4. import sys
  5. import os
  6. import getopt
  7. +import re
  8. from distutils import sysconfig
  9. valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
  10. @@ -37,8 +38,8 @@
  11. print sysconfig.EXEC_PREFIX
  12. elif opt in ('--includes', '--cflags'):
  13. - flags = ['-I' + sysconfig.get_python_inc(),
  14. - '-I' + sysconfig.get_python_inc(plat_specific=True)]
  15. + flags = ['-I' + re.sub('@@STAGING_TARGET_DIR@@', '@@STAGING_HOST_DIR@@', sysconfig.get_python_inc()),
  16. + '-I' + re.sub('@@STAGING_TARGET_DIR@@', '@@STAGING_HOST_DIR@@', sysconfig.get_python_inc(plat_specific=True))]
  17. if opt == '--cflags':
  18. flags.extend(getvar('CFLAGS').split())
  19. print ' '.join(flags)