summaryrefslogtreecommitdiff
path: root/pyuno/zipcore/python.sh
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2011-06-06 20:09:06 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2011-06-06 20:09:06 +0200
commit41893e087a482da83e80cc553f225d877a776f1d (patch)
tree30de2122f2b1213a598bb4e3615ad260dcfe3fd0 /pyuno/zipcore/python.sh
parent47a7b9021f07f368c9c2f02cb10417d4a3acb6bf (diff)
allow to use internal Python on Mac (Python built as framework)
Diffstat (limited to 'pyuno/zipcore/python.sh')
-rw-r--r--pyuno/zipcore/python.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/pyuno/zipcore/python.sh b/pyuno/zipcore/python.sh
index d32158fe491e..e32f1370a0d0 100644
--- a/pyuno/zipcore/python.sh
+++ b/pyuno/zipcore/python.sh
@@ -30,7 +30,7 @@
sd_cwd="`pwd`"
if [ -h "$0" ] ; then
sd_basename=`basename "$0"`
- sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
+ sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
cd "`dirname "$0"`"
cd "`dirname "$sd_script"`"
else
@@ -56,6 +56,7 @@ export UNO_PATH
: ${URE_BOOTSTRAP=vnd.sun.star.pathname:$sd_prog/fundamentalrc}
export URE_BOOTSTRAP
+NONMACSECTION
PYTHONPATH=$sd_prog/../basis-link/program:$sd_prog/../basis-link/program/python-core-%%PYVERSION%%/lib:$sd_prog/../basis-link/program/python-core-%%PYVERSION%%/lib/lib-dynload:$sd_prog/../basis-link/program/python-core-%%PYVERSION%%/lib/lib-tk:$sd_prog/../basis-link/program/python-core-%%PYVERSION%%/lib/site-packages${PYTHONPATH+:$PYTHONPATH}
export PYTHONPATH
PYTHONHOME=$sd_prog/../basis-link/program/python-core-%%PYVERSION%%
@@ -63,3 +64,13 @@ export PYTHONHOME
# execute binary
exec "$sd_prog/../basis-link/program/python.bin" "$@"
+MACSECTION
+PYTHONHOME=$sd_prog/../basis-link/program/OOoPython.framework
+export PYTHONHOME
+
+pybasislibdir=$PYTHONHOME/Versions/%%PYVERSION%%/lib/python%%PYVERSION%%
+PYTHONPATH=$sd_prog/../basis-link/program:$pybasislibdir:$pybasislibdir/lib-dynload:$pybasislibdir/lib-tk:$pybasislibdir/site-packages${PYTHONPATH+:$PYTHONPATH}
+export PYTHONPATH
+
+# execute binary
+exec "$PYTHONHOME/Versions/%%PYVERSION%%/Resources/Python.app/Contents/MacOS/OOoPython" "$@"