Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Should apply to master, worth backporting to 3.4.
From 4e5cc18d29501bd6b8c46f6586ae2c47945a0d19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.cz>
Date: Mon, 22 Aug 2011 11:29:44 +0200
Subject: [PATCH] Try to make pyuno work with system python.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

Signed-off-by: Tomáš Chvátal <tchvatal@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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.