[Libreoffice-commits] core.git: pyuno/source
Tor Lillqvist
tml at collabora.com
Sun Sep 21 11:12:34 PDT 2014
pyuno/source/loader/pyuno_loader.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 4e124fd1409af419990bacade74fcf355624243f
Author: Tor Lillqvist <tml at collabora.com>
Date: Sun Sep 21 20:46:03 2014 +0300
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
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 36d6ffd..d43bf73 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 <config_features.h>
#include <config_folders.h>
#include <pyuno/pyuno.hxx>
@@ -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();
More information about the Libreoffice-commits
mailing list