[PATCH] Try to make pyuno work with system python.

Tomáš Chvátal tchvatal at suse.cz
Mon Aug 22 02:29:44 PDT 2011


Consolidate two patches from build:
	pyuno-oodir.diff.in
	system-python-ure-bootstrap.diff.in

Signed-off-by: Tomáš Chvátal <tchvatal at suse.cz>
---
 configure.in                              |    7 ++++++-
 desktop/scripts/soffice.sh                |    3 +++
 pyuno/source/module/{uno.py => uno.py.in} |    5 +++++
 3 files changed, 14 insertions(+), 1 deletions(-)
 rename pyuno/source/module/{uno.py => uno.py.in} (98%)

diff --git a/configure.in b/configure.in
index 244e0ef..5d20d4e 100755
--- a/configure.in
+++ b/configure.in
@@ -9158,7 +9158,12 @@ else
     echo > set_soenv.last
 fi
 
-AC_OUTPUT([set_soenv Makefile bin/repo-list])
+AC_OUTPUT([
+set_soenv
+Makefile
+bin/repo-list
+pyuno/source/module/uno.py
+])
 
 # touch the config timestamp file set_soenv.stamp
 if test ! -f set_soenv.stamp; then
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index 775f974..05427cf 100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -129,6 +129,9 @@ if echo "$checks" | grep -q "cc" ; then
     exit 1;
 fi
 
+PYTHONPATH=$sd_prog/../basis-link/program${PYTHONPATH+:$PYTHONPATH} 
+export PYTHONPATH 
+
 case "`uname -s`" in
 NetBSD|OpenBSD|FreeBSD|DragonFly)
 # this is a temporary hack until we can live with the default search paths
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py.in
similarity index 98%
rename from pyuno/source/module/uno.py
rename to pyuno/source/module/uno.py.in
index e82d9d6..11dc0ef 100644
--- a/pyuno/source/module/uno.py
+++ b/pyuno/source/module/uno.py.in
@@ -26,8 +26,13 @@
 # for a copy of the LGPLv3 License.
 #
 #*************************************************************************
+import os
 import sys
 
+sys.path.append('@libdir@/@OOOINSTALLDIRNAME@/basis-link/program')
+if getattr(os.environ, 'URE_BOOTSTRAP', None) is None:
+    os.environ['URE_BOOTSTRAP'] = "vnd.sun.star.pathname:@libdir@/@OOOINSTALLDIRNAME@/program/fundamentalrc"
+
 import pyuno
 
 try:
-- 
1.7.6


--------------020303070302030507090501--


More information about the LibreOffice mailing list