Files
LibreELEC.tv/packages/mediacenter/xbmc/patches/xbmc-fd08f6d-408-enable_PYTHONOPTIMIZE_with_external_Python-0.1.patch
Stephan Raue fde5d4bd20 xbmc: update to xbmc-fd08f6d
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2012-01-20 00:09:18 +01:00

19 lines
1.0 KiB
Diff

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