summaryrefslogtreecommitdiff
path: root/media-tv/xbmc/files/xbmc-10.0-python-2.7.patch
blob: e3d17a5e074da49c7c2fb5406bbbcb9cde04bfcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
patch from upstream

https://bugs.gentoo.org/350098

From ab0f816c6307f38d7248d0469379c981f94b816d Mon Sep 17 00:00:00 2001
From: ceros7 <ceros7@568bbfeb-2a22-0410-94d2-cc84cf5bfa90>
Date: Mon, 30 Aug 2010 16:46:50 +0000
Subject: [PATCH] Support external python2.7.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/python2.7@33342 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
---
 configure.in                                       |   10 ++++++-
 xbmc/lib/libPython/XBPyThread.cpp                  |    5 +++-
 xbmc/lib/libPython/XBPyThread.h                    |    4 ++-
 xbmc/lib/libPython/XBPython.cpp                    |   24 +++++++++++++++-----
 xbmc/lib/libPython/XBPythonDll.cpp                 |    4 ++-
 xbmc/lib/libPython/XBPythonDllFuncs.S              |    4 ++-
 xbmc/lib/libPython/linux/Makefile.in               |    5 +++-
 xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h    |    4 ++-
 xbmc/lib/libPython/xbmcmodule/PythonAddon.h        |    4 ++-
 xbmc/lib/libPython/xbmcmodule/PythonPlayer.h       |    4 ++-
 xbmc/lib/libPython/xbmcmodule/action.h             |    4 ++-
 xbmc/lib/libPython/xbmcmodule/control.h            |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controlbutton.cpp    |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controlgroup.cpp     |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controlimage.cpp     |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controllabel.cpp     |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controllist.cpp      |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controlprogress.cpp  |    4 ++-
 .../libPython/xbmcmodule/controlradiobutton.cpp    |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controlslider.cpp    |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controlspin.cpp      |    4 ++-
 xbmc/lib/libPython/xbmcmodule/controltextbox.cpp   |    4 ++-
 xbmc/lib/libPython/xbmcmodule/dialog.cpp           |    4 ++-
 xbmc/lib/libPython/xbmcmodule/dialog.h             |    4 ++-
 xbmc/lib/libPython/xbmcmodule/infotagmusic.h       |    4 ++-
 xbmc/lib/libPython/xbmcmodule/infotagvideo.h       |    4 ++-
 xbmc/lib/libPython/xbmcmodule/keyboard.h           |    4 ++-
 xbmc/lib/libPython/xbmcmodule/listitem.cpp         |    4 ++-
 xbmc/lib/libPython/xbmcmodule/listitem.h           |    4 ++-
 xbmc/lib/libPython/xbmcmodule/player.h             |    4 ++-
 xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp       |    4 ++-
 xbmc/lib/libPython/xbmcmodule/pyplaylist.h         |    4 ++-
 xbmc/lib/libPython/xbmcmodule/pyutil.h             |    4 ++-
 xbmc/lib/libPython/xbmcmodule/window.h             |    4 ++-
 xbmc/lib/libPython/xbmcmodule/winxml.cpp           |    4 ++-
 xbmc/lib/libPython/xbmcmodule/winxml.h             |    4 ++-
 xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp     |    4 ++-
 xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp  |    4 ++-
 xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp    |    5 +++-
 xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp       |    4 ++-
 42 files changed, 149 insertions(+), 48 deletions(-)

diff --git a/configure.in b/configure.in
index 4c0b1b7..cd3429e 100644
--- a/configure.in
+++ b/configure.in
@@ -901,7 +901,11 @@ fi
 
 # External Python
 if test "$use_external_python" = "yes"; then
-  AC_CHECK_LIB([python2.6], [main],
+  AC_CHECK_LIB([python2.7], [main],
+    [AC_DEFINE([HAVE_LIBPYTHON2_7], [1],
+    [Define to 1 if you have the 'python2.7' library.])
+    USE_PYTHON2_7=1],
+  [AC_CHECK_LIB([python2.6], [main],
     [AC_DEFINE([HAVE_LIBPYTHON2_6], [1],
     [Define to 1 if you have the 'python2.6' library.])
     USE_PYTHON2_6=1],
@@ -913,9 +917,10 @@ if test "$use_external_python" = "yes"; then
     [AC_DEFINE([HAVE_LIBPYTHON2_4], [1],
     [Define to 1 if you have the 'python2.4' library.])
     USE_PYTHON2_4=1],
-  [AC_MSG_ERROR($missing_library)] )] )] )
+  [AC_MSG_ERROR($missing_library)] )] )] )] )
 
   AC_MSG_NOTICE($external_python_enabled)
+  test "$USE_PYTHON2_7" && AC_MSG_NOTICE([Using Python 2.7])
   test "$USE_PYTHON2_6" && AC_MSG_NOTICE([Using Python 2.6])
   test "$USE_PYTHON2_5" && AC_MSG_NOTICE([Using Python 2.5])
   test "$USE_PYTHON2_4" && AC_MSG_NOTICE([Using Python 2.4])
@@ -1471,6 +1476,7 @@ AC_SUBST(USE_INTERNAL_LIBDTS)
 AC_SUBST(USE_EXTERNAL_LIBMPEG2)
 AC_SUBST(USE_EXTERNAL_LIBWAVPACK)
 AC_SUBST(USE_EXTERNAL_PYTHON)
+AC_SUBST(USE_PYTHON2_7)
 AC_SUBST(USE_PYTHON2_6)
 AC_SUBST(USE_PYTHON2_5)
 AC_SUBST(USE_PYTHON2_4)
diff --git a/xbmc/lib/libPython/XBPyThread.cpp b/xbmc/lib/libPython/XBPyThread.cpp
index 3a6f34e..71b4b9a 100644
--- a/xbmc/lib/libPython/XBPyThread.cpp
+++ b/xbmc/lib/libPython/XBPyThread.cpp
@@ -24,7 +24,10 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+    #include <python2.7/osdefs.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
     #include <python2.6/osdefs.h>
   #elif (defined HAVE_LIBPYTHON2_5)
diff --git a/xbmc/lib/libPython/XBPyThread.h b/xbmc/lib/libPython/XBPyThread.h
index c3da337..eea7fea 100644
--- a/xbmc/lib/libPython/XBPyThread.h
+++ b/xbmc/lib/libPython/XBPyThread.h
@@ -26,7 +26,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/XBPython.cpp b/xbmc/lib/libPython/XBPython.cpp
index e52cdfb..defcf14 100644
--- a/xbmc/lib/libPython/XBPython.cpp
+++ b/xbmc/lib/libPython/XBPython.cpp
@@ -24,7 +24,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
@@ -61,7 +63,9 @@ XBPython g_pythonParser;
 #define PYTHON_DLL "special://xbmcbin/system/python/python24-x86-osx.so"
 #endif
 #elif defined(__x86_64__)
-#if (defined HAVE_LIBPYTHON2_6)
+#if (defined HAVE_LIBPYTHON2_7)
+#define PYTHON_DLL "special://xbmcbin/system/python/python27-x86_64-linux.so"
+#elif (defined HAVE_LIBPYTHON2_6)
 #define PYTHON_DLL "special://xbmcbin/system/python/python26-x86_64-linux.so"
 #elif (defined HAVE_LIBPYTHON2_5)
 #define PYTHON_DLL "special://xbmcbin/system/python/python25-x86_64-linux.so"
@@ -69,7 +73,9 @@ XBPython g_pythonParser;
 #define PYTHON_DLL "special://xbmcbin/system/python/python24-x86_64-linux.so"
 #endif
 #elif defined(_POWERPC)
-#if (defined HAVE_LIBPYTHON2_6)
+#if (defined HAVE_LIBPYTHON2_7)
+#define PYTHON_DLL "special://xbmcbin/system/python/python27-powerpc-linux.so"
+#elif (defined HAVE_LIBPYTHON2_6)
 #define PYTHON_DLL "special://xbmcbin/system/python/python26-powerpc-linux.so"
 #elif (defined HAVE_LIBPYTHON2_5)
 #define PYTHON_DLL "special://xbmcbin/system/python/python25-powerpc-linux.so"
@@ -77,7 +83,9 @@ XBPython g_pythonParser;
 #define PYTHON_DLL "special://xbmcbin/system/python/python24-powerpc-linux.so"
 #endif
 #elif defined(_POWERPC64)
-#if (defined HAVE_LIBPYTHON2_6)
+#if (defined HAVE_LIBPYTHON2_7)
+#define PYTHON_DLL "special://xbmcbin/system/python/python27-powerpc64-linux.so"
+#elif (defined HAVE_LIBPYTHON2_6)
 #define PYTHON_DLL "special://xbmcbin/system/python/python26-powerpc64-linux.so"
 #elif (defined HAVE_LIBPYTHON2_5)
 #define PYTHON_DLL "special://xbmcbin/system/python/python25-powerpc64-linux.so"
@@ -85,7 +93,9 @@ XBPython g_pythonParser;
 #define PYTHON_DLL "special://xbmcbin/system/python/python24-powerpc64-linux.so"
 #endif
 #elif defined(_ARMEL)
-#if (defined HAVE_LIBPYTHON2_6)
+#if (defined HAVE_LIBPYTHON2_7)
+#define PYTHON_DLL "special://xbmc/system/python/python27-arm.so"
+#elif (defined HAVE_LIBPYTHON2_6)
 #define PYTHON_DLL "special://xbmc/system/python/python26-arm.so"
 #elif (defined HAVE_LIBPYTHON2_5)
 #define PYTHON_DLL "special://xbmc/system/python/python25-arm.so"
@@ -93,7 +103,9 @@ XBPython g_pythonParser;
 #define PYTHON_DLL "special://xbmc/system/python/python24-arm.so"
 #endif
 #else /* !__x86_64__ && !__powerpc__ */
-#if (defined HAVE_LIBPYTHON2_6)
+#if (defined HAVE_LIBPYTHON2_7)
+#define PYTHON_DLL "special://xbmcbin/system/python/python27-i486-linux.so"
+#elif (defined HAVE_LIBPYTHON2_6)
 #define PYTHON_DLL "special://xbmcbin/system/python/python26-i486-linux.so"
 #elif (defined HAVE_LIBPYTHON2_5)
 #define PYTHON_DLL "special://xbmcbin/system/python/python25-i486-linux.so"
diff --git a/xbmc/lib/libPython/XBPythonDll.cpp b/xbmc/lib/libPython/XBPythonDll.cpp
index bc9d827..87ac7d7 100644
--- a/xbmc/lib/libPython/XBPythonDll.cpp
+++ b/xbmc/lib/libPython/XBPythonDll.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/pyconfig.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/pyconfig.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/pyconfig.h>
diff --git a/xbmc/lib/libPython/XBPythonDllFuncs.S b/xbmc/lib/libPython/XBPythonDllFuncs.S
index 6b7a6c3..f59b192 100644
--- a/xbmc/lib/libPython/XBPythonDllFuncs.S
+++ b/xbmc/lib/libPython/XBPythonDllFuncs.S
@@ -2,7 +2,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/pyconfig.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/pyconfig.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/pyconfig.h>
diff --git a/xbmc/lib/libPython/linux/Makefile.in b/xbmc/lib/libPython/linux/Makefile.in
index 7011434..0786937 100644
--- a/xbmc/lib/libPython/linux/Makefile.in
+++ b/xbmc/lib/libPython/linux/Makefile.in
@@ -5,7 +5,10 @@ LDFLAGS=@LDFLAGS@
 SHELL=/bin/bash
 SYSDIR=../../../../system/python
 
-ifeq (@USE_PYTHON2_6@,1)
+ifeq (@USE_PYTHON2_7@,1)
+    PYVERSION=python2.7
+    SO=python27-$(ARCH).so
+else ifeq (@USE_PYTHON2_6@,1)
     PYVERSION=python2.6
     SO=python26-$(ARCH).so
 else ifeq (@USE_PYTHON2_5@,1)
diff --git a/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h b/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h
index 620d9bd..06fa146 100644
--- a/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h
+++ b/xbmc/lib/libPython/xbmcmodule/GUIPythonWindow.h
@@ -26,7 +26,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/PythonAddon.h b/xbmc/lib/libPython/xbmcmodule/PythonAddon.h
index ec7ed28..41eb8ea 100644
--- a/xbmc/lib/libPython/xbmcmodule/PythonAddon.h
+++ b/xbmc/lib/libPython/xbmcmodule/PythonAddon.h
@@ -25,7 +25,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/PythonPlayer.h b/xbmc/lib/libPython/xbmcmodule/PythonPlayer.h
index ecee993..24a1c87 100644
--- a/xbmc/lib/libPython/xbmcmodule/PythonPlayer.h
+++ b/xbmc/lib/libPython/xbmcmodule/PythonPlayer.h
@@ -25,7 +25,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/action.h b/xbmc/lib/libPython/xbmcmodule/action.h
index 0e20000..7f8b1bc 100644
--- a/xbmc/lib/libPython/xbmcmodule/action.h
+++ b/xbmc/lib/libPython/xbmcmodule/action.h
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/control.h b/xbmc/lib/libPython/xbmcmodule/control.h
index c76b37c..a9ec63d 100644
--- a/xbmc/lib/libPython/xbmcmodule/control.h
+++ b/xbmc/lib/libPython/xbmcmodule/control.h
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controlbutton.cpp b/xbmc/lib/libPython/xbmcmodule/controlbutton.cpp
index b24ccce..7455ca7 100644
--- a/xbmc/lib/libPython/xbmcmodule/controlbutton.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controlbutton.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp b/xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp
index 96e4743..86a7d8b 100644
--- a/xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controlcheckmark.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp b/xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp
index 68442d8..c6eb052 100644
--- a/xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controlfadelabel.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controlgroup.cpp b/xbmc/lib/libPython/xbmcmodule/controlgroup.cpp
index aadfc17..8275324 100644
--- a/xbmc/lib/libPython/xbmcmodule/controlgroup.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controlgroup.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controlimage.cpp b/xbmc/lib/libPython/xbmcmodule/controlimage.cpp
index 79835d6..f106e90 100644
--- a/xbmc/lib/libPython/xbmcmodule/controlimage.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controlimage.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controllabel.cpp b/xbmc/lib/libPython/xbmcmodule/controllabel.cpp
index aca22e4..38a9c07 100644
--- a/xbmc/lib/libPython/xbmcmodule/controllabel.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controllabel.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controllist.cpp b/xbmc/lib/libPython/xbmcmodule/controllist.cpp
index 0c67b5c..bb57776 100644
--- a/xbmc/lib/libPython/xbmcmodule/controllist.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controllist.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controlprogress.cpp b/xbmc/lib/libPython/xbmcmodule/controlprogress.cpp
index a21e462..b460a2a 100644
--- a/xbmc/lib/libPython/xbmcmodule/controlprogress.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controlprogress.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controlradiobutton.cpp b/xbmc/lib/libPython/xbmcmodule/controlradiobutton.cpp
index ec54efd..b966a17 100644
--- a/xbmc/lib/libPython/xbmcmodule/controlradiobutton.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controlradiobutton.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controlslider.cpp b/xbmc/lib/libPython/xbmcmodule/controlslider.cpp
index 21ea5e7..c5f65b3 100644
--- a/xbmc/lib/libPython/xbmcmodule/controlslider.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controlslider.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controlspin.cpp b/xbmc/lib/libPython/xbmcmodule/controlspin.cpp
index 4e24e14..feead3c 100644
--- a/xbmc/lib/libPython/xbmcmodule/controlspin.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controlspin.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/controltextbox.cpp b/xbmc/lib/libPython/xbmcmodule/controltextbox.cpp
index b4c44d5..4a7c688 100644
--- a/xbmc/lib/libPython/xbmcmodule/controltextbox.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/controltextbox.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/dialog.cpp b/xbmc/lib/libPython/xbmcmodule/dialog.cpp
index caa8986..cffe485 100644
--- a/xbmc/lib/libPython/xbmcmodule/dialog.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/dialog.cpp
@@ -24,7 +24,9 @@
 #endif
 #include "dialog.h"
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/dialog.h b/xbmc/lib/libPython/xbmcmodule/dialog.h
index edcae41..a61c4b1 100644
--- a/xbmc/lib/libPython/xbmcmodule/dialog.h
+++ b/xbmc/lib/libPython/xbmcmodule/dialog.h
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/infotagmusic.h b/xbmc/lib/libPython/xbmcmodule/infotagmusic.h
index d202e48..590b858 100644
--- a/xbmc/lib/libPython/xbmcmodule/infotagmusic.h
+++ b/xbmc/lib/libPython/xbmcmodule/infotagmusic.h
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/infotagvideo.h b/xbmc/lib/libPython/xbmcmodule/infotagvideo.h
index f2bb300..e808573 100644
--- a/xbmc/lib/libPython/xbmcmodule/infotagvideo.h
+++ b/xbmc/lib/libPython/xbmcmodule/infotagvideo.h
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/keyboard.h b/xbmc/lib/libPython/xbmcmodule/keyboard.h
index e5c817f..0f069e3 100644
--- a/xbmc/lib/libPython/xbmcmodule/keyboard.h
+++ b/xbmc/lib/libPython/xbmcmodule/keyboard.h
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/listitem.cpp b/xbmc/lib/libPython/xbmcmodule/listitem.cpp
index 137436e..20105ef 100644
--- a/xbmc/lib/libPython/xbmcmodule/listitem.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/listitem.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/listitem.h b/xbmc/lib/libPython/xbmcmodule/listitem.h
index 7ebcd6c..3d4a6c8 100644
--- a/xbmc/lib/libPython/xbmcmodule/listitem.h
+++ b/xbmc/lib/libPython/xbmcmodule/listitem.h
@@ -25,7 +25,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/player.h b/xbmc/lib/libPython/xbmcmodule/player.h
index 48dc9c7..34a102d 100644
--- a/xbmc/lib/libPython/xbmcmodule/player.h
+++ b/xbmc/lib/libPython/xbmcmodule/player.h
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp b/xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp
index c7e7f62..6df8548 100644
--- a/xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/pyplaylist.cpp
@@ -26,7 +26,9 @@
 #include "Util.h"
 #include "pyplaylist.h"
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/pyplaylist.h b/xbmc/lib/libPython/xbmcmodule/pyplaylist.h
index f2334bb..2410314 100644
--- a/xbmc/lib/libPython/xbmcmodule/pyplaylist.h
+++ b/xbmc/lib/libPython/xbmcmodule/pyplaylist.h
@@ -25,7 +25,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/pyutil.h b/xbmc/lib/libPython/xbmcmodule/pyutil.h
index 4acf6e5..1a156f8 100644
--- a/xbmc/lib/libPython/xbmcmodule/pyutil.h
+++ b/xbmc/lib/libPython/xbmcmodule/pyutil.h
@@ -25,7 +25,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/window.h b/xbmc/lib/libPython/xbmcmodule/window.h
index 6ce8e72..40304ff 100644
--- a/xbmc/lib/libPython/xbmcmodule/window.h
+++ b/xbmc/lib/libPython/xbmcmodule/window.h
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/winxml.cpp b/xbmc/lib/libPython/xbmcmodule/winxml.cpp
index d3b703f..3e1b3c8 100644
--- a/xbmc/lib/libPython/xbmcmodule/winxml.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/winxml.cpp
@@ -24,7 +24,9 @@
 #endif
 #include "winxml.h"
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/winxml.h b/xbmc/lib/libPython/xbmcmodule/winxml.h
index 6e6489e..f3a8dd8 100644
--- a/xbmc/lib/libPython/xbmcmodule/winxml.h
+++ b/xbmc/lib/libPython/xbmcmodule/winxml.h
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp b/xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp
index b021501..92d9903 100644
--- a/xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/winxmldialog.cpp
@@ -24,7 +24,9 @@
 #endif
 #include "winxml.h"
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp b/xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp
index b8bc0a3..c65aded 100644
--- a/xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/xbmcaddonmodule.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
diff --git a/xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp b/xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp
index 87c0ead..9941769 100644
--- a/xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/xbmcguimodule.cpp
@@ -23,7 +23,10 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+    #include <python2.7/structmember.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
     #include <python2.6/structmember.h>
   #elif (defined HAVE_LIBPYTHON2_5)
diff --git a/xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp b/xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp
index 3bab5a9..1e2c480 100644
--- a/xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp
+++ b/xbmc/lib/libPython/xbmcmodule/xbmcmodule.cpp
@@ -23,7 +23,9 @@
   #include "config.h"
 #endif
 #if (defined USE_EXTERNAL_PYTHON)
-  #if (defined HAVE_LIBPYTHON2_6)
+  #if (defined HAVE_LIBPYTHON2_7)
+    #include <python2.7/Python.h>
+  #elif (defined HAVE_LIBPYTHON2_6)
     #include <python2.6/Python.h>
   #elif (defined HAVE_LIBPYTHON2_5)
     #include <python2.5/Python.h>
-- 
1.7.3.1