From 4e124fd1409af419990bacade74fcf355624243f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 21 Sep 2014 20:46:03 +0300 Subject: Don't try to write Python bytecode files in case of a read-only installset It causes annoying messages in the system log in the OS X sandboxed case. Change-Id: I8ae3eb34df2c045bdbdfc63cae9007f973c42537 --- pyuno/source/loader/pyuno_loader.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pyuno') diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx index 36d6ffddf0d6..d43bf7360bd1 100644 --- a/pyuno/source/loader/pyuno_loader.cxx +++ b/pyuno/source/loader/pyuno_loader.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include @@ -218,6 +219,11 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c #else PyImport_AppendInittab( (char*)"pyuno", initpyuno ); #endif + +#if HAVE_FEATURE_READONLY_INSTALLSET + Py_DontWriteBytecodeFlag = 1; +#endif + // initialize python Py_Initialize(); PyEval_InitThreads(); -- cgit