/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
- diff -Naur xbmc-a3c804b/xbmc/interfaces/python/XBPython.cpp xbmc-a3c804b.patch/xbmc/interfaces/python/XBPython.cpp
- --- xbmc-a3c804b/xbmc/interfaces/python/XBPython.cpp 2011-08-17 23:40:00.000000000 +0200
- +++ xbmc-a3c804b.patch/xbmc/interfaces/python/XBPython.cpp 2011-08-18 03:50:49.652475572 +0200
- @@ -335,11 +335,9 @@
- // at http://docs.python.org/using/cmdline.html#environment-variables
-
- #if !defined(_WIN32)
- - /* PYTHONOPTIMIZE is set off intentionally when using external Python.
- - Reason for this is because we cannot be sure what version of Python
- - was used to compile the various Python object files (i.e. .pyo,
- - .pyc, etc.). */
- - // check if we are running as real xbmc.app or just binary
- + // Required for python to find optimized code (pyo) files
- + setenv("PYTHONOPTIMIZE", "1", 1);
- + // check if we are running as real xbmc.app or just binary
- if (!CUtil::GetFrameworksPath(true).IsEmpty())
- {
- // using external python, it's build looking for xxx/lib/python2.6