/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

  1. diff -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. #if !defined(_WIN32)
  7. - /* PYTHONOPTIMIZE is set off intentionally when using external Python.
  8. - Reason for this is because we cannot be sure what version of Python
  9. - was used to compile the various Python object files (i.e. .pyo,
  10. - .pyc, etc.). */
  11. - // check if we are running as real xbmc.app or just binary
  12. + // Required for python to find optimized code (pyo) files
  13. + setenv("PYTHONOPTIMIZE", "1", 1);
  14. + // check if we are running as real xbmc.app or just binary
  15. if (!CUtil::GetFrameworksPath(true).IsEmpty())
  16. {
  17. // using external python, it's build looking for xxx/lib/python2.6