summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/python/python-conf
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/python/python-conf')
-rwxr-xr-xsca-cpp/trunk/modules/python/python-conf13
1 files changed, 10 insertions, 3 deletions
diff --git a/sca-cpp/trunk/modules/python/python-conf b/sca-cpp/trunk/modules/python/python-conf
index a5b45357fc..359d596b05 100755
--- a/sca-cpp/trunk/modules/python/python-conf
+++ b/sca-cpp/trunk/modules/python/python-conf
@@ -18,13 +18,20 @@
# under the License.
# Generate a Python server conf
-here=`readlink -f $0`; here=`dirname $here`
+here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here`
mkdir -p $1
-root=`readlink -f $1`
+root=`echo "import os; print os.path.realpath('$1')" | python`
+
+uname=`uname -s`
+if [ $uname = "Darwin" ]; then
+ libsuffix=".dylib"
+else
+ libsuffix=".so"
+fi
cat >>$root/conf/modules.conf <<EOF
# Generated by: python-conf $*
# Support for Python SCA components
-LoadModule mod_tuscany_eval $here/libmod_tuscany_python.so
+LoadModule mod_tuscany_eval $here/libmod_tuscany_python$libsuffix
EOF