PageRenderTime 15ms CodeModel.GetById 13ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 1ms

/packages/mediacenter/xbmc/patches/xbmc-3943772-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch

http://github.com/OpenELEC/OpenELEC.tv
Patch | 18 lines | 17 code | 1 blank | 0 comment | 0 complexity | 7bd420180be906d2d17078b21a0546ed MD5 | raw file
 1diff -Naur xbmc-a3c804b/xbmc/interfaces/python/XBPython.cpp xbmc-a3c804b.patch/xbmc/interfaces/python/XBPython.cpp
 2--- xbmc-a3c804b/xbmc/interfaces/python/XBPython.cpp	2011-08-17 23:40:00.000000000 +0200
 3+++ xbmc-a3c804b.patch/xbmc/interfaces/python/XBPython.cpp	2011-08-18 03:50:49.652475572 +0200
 4@@ -335,11 +335,9 @@
 5       // at http://docs.python.org/using/cmdline.html#environment-variables
 6 
 7 #if !defined(_WIN32)
 8-      /* PYTHONOPTIMIZE is set off intentionally when using external Python.
 9-         Reason for this is because we cannot be sure what version of Python
10-         was used to compile the various Python object files (i.e. .pyo,
11-         .pyc, etc.). */
12-        // check if we are running as real xbmc.app or just binary
13+      // Required for python to find optimized code (pyo) files
14+      setenv("PYTHONOPTIMIZE", "1", 1);
15+      // check if we are running as real xbmc.app or just binary
16       if (!CUtil::GetFrameworksPath(true).IsEmpty())
17       {
18         // using external python, it's build looking for xxx/lib/python2.6