#!/bin/sh
set -e

. optvars
APPNAME=`basename $1 | sed 's/_.*//'`
for PYVER in $KUMATUXPYTHONVERSIONS
do
    if [ -d $1/lib/python$PYVER/site-packages -a ! $APPNAME = python ]
    then
	SEARCH="lib/python$PYVER/site-packages"
	ROOTDIR=$KUMATUXROOTPYTHON
	ETCDIR=$KUMATUXETCPYTHON

	$KUMATUXLINK/python-link.sh $1 $SEARCH $ETCDIR $ROOTDIR $PYVER
    fi
done

## link python into /usr/lib/
if [ $APPNAME = "python" ]
then
    $KUMATUXLINK/python-usr-lib.sh $1
fi
