summaryrefslogtreecommitdiff
path: root/pyuno/source
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-09-21 20:46:03 +0300
committerTor Lillqvist <tml@collabora.com>2014-09-21 21:11:30 +0300
commit4e124fd1409af419990bacade74fcf355624243f (patch)
tree852504e14fcf41c0a9df3e0f94dc1ba6282e8580 /pyuno/source
parent8ac7ca79f67c307a08ed5e795ae00c9ac1e0b5bd (diff)
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
Diffstat (limited to 'pyuno/source')
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx6
1 files changed, 6 insertions, 0 deletions
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 <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();