summaryrefslogtreecommitdiff
path: root/package/python2/patches/patch-Misc_python-config_in
blob: 9734d4fbd5effca219db7aaa512a1e2017a66da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- Python-2.7.5.orig/Misc/python-config.in	2013-05-12 05:32:49.000000000 +0200
+++ Python-2.7.5/Misc/python-config.in	2013-10-30 21:29:47.000000000 +0100
@@ -3,6 +3,7 @@
 import sys
 import os
 import getopt
+import re
 from distutils import sysconfig
 
 valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
@@ -37,8 +38,8 @@ for opt in opt_flags:
         print sysconfig.EXEC_PREFIX
 
     elif opt in ('--includes', '--cflags'):
-        flags = ['-I' + sysconfig.get_python_inc(),
-                 '-I' + sysconfig.get_python_inc(plat_specific=True)]
+        flags = ['-I' + re.sub('host_', 'target_', sysconfig.get_python_inc()),
+                 '-I' + re.sub('host_', 'target_', sysconfig.get_python_inc(plat_specific=True))]
         if opt == '--cflags':
             flags.extend(getvar('CFLAGS').split())
         print ' '.join(flags)