#!/bin/sh path=`which python 2> /dev/null` if [ $? = 0 ] then # Change this as needed export PYTHON_INCLUDE=`python -c "import sys;print \"%s/include/python%d.%d\"%(sys.prefix,sys.version_info[0],sys.version_info[1])"` [ ! -d "$PYTHON_INCLUDE" ] && echo python development missing && exit 1 ln -sf ../melted.i # Invoke swig swig -c++ -I../../melted++ `pkg-config mlt++ --cflags` -python melted.i || exit $? # Compile the wrapper g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../../melted++ `pkg-config mlt++ --cflags` -I$PYTHON_INCLUDE melted_wrap.cxx || exit $? # Create the module gcc -shared melted_wrap.o -L../../melted++ -lmelted++ -o _melted.so || exit $? else echo Python not installed. exit 1 fi