File pycompile-searchpath.patch of Package python3-gobject.852
Index: pygobject-3.10.2/py-compile
===================================================================
--- pygobject-3.10.2/py-compile 2013-11-11 14:36:41.000000000 +0100
+++ pygobject-3.10.2/py-compile 2014-02-13 15:52:46.990468006 +0100
@@ -116,7 +116,11 @@
fi
$PYTHON -c "
-import sys, os, py_compile, imp
+import sys
+# when this runs interactively, '' (cwd) is in sys.path. we don't want that.
+sys.path.remove('')
+
+import os, py_compile, imp
files = '''$files'''
@@ -137,7 +141,10 @@
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
-import sys, os, py_compile, imp
+import sys
+# when this runs interactively, '' (cwd) is in sys.path. we don't want that.
+sys.path.remove('')
+import os, py_compile, imp
# pypy does not use .pyo optimization
if hasattr(sys, 'pypy_translation_info'):