From 187f9e943dbcb8efac8d7c3faa99bb6d8b1b8f59 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 16 Aug 2011 04:07:19 +0200 Subject: [PATCH] xbmc: add patch to enable 'PYTHONOPTIMIZE' with external Python too Signed-off-by: Stephan Raue --- ...PYTHONOPTIMIZE_with_external_Python-0.1.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch new file mode 100644 index 0000000000..d97a4b7e94 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch @@ -0,0 +1,16 @@ +diff -Naur xbmc-10.1-Dharma/xbmc/lib/libPython/XBPython.cpp xbmc-10.1-Dharma.patch/xbmc/lib/libPython/XBPython.cpp +--- xbmc-10.1-Dharma/xbmc/lib/libPython/XBPython.cpp 2011-03-08 02:49:15.000000000 +0100 ++++ xbmc-10.1-Dharma.patch/xbmc/lib/libPython/XBPython.cpp 2011-08-16 04:04:59.808482717 +0200 +@@ -381,10 +381,8 @@ + CLog::Log(LOGDEBUG, "Python wrapper library linked with internal Python library"); + #endif /* _LINUX */ + #else +- /* 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.). */ ++ // Required for python to find optimized code (pyo) files ++ setenv("PYTHONOPTIMIZE", "1", 1); + setenv("PYTHONCASEOK", "1", 1); //This line should really be removed + CLog::Log(LOGDEBUG, "Python wrapper library linked with system Python library"); + #endif /* USE_EXTERNAL_PYTHON */