X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2B%2B%2Fswig%2Fpython%2Fbuild;fp=mlt%2B%2B%2Fswig%2Fpython%2Fbuild;h=01660a6da5b043425d7e2d5efd3d4bcfa9353c07;hb=ccdf1f8b1a0a81a30058240818e0e6e221c84bb6;hp=0000000000000000000000000000000000000000;hpb=b61d43804b15c0ddf8a3579cdcd2146105d9be26;p=melted diff --git a/mlt++/swig/python/build b/mlt++/swig/python/build new file mode 100755 index 0000000..01660a6 --- /dev/null +++ b/mlt++/swig/python/build @@ -0,0 +1,25 @@ +#!/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 ../mltpp.i . + + # Invoke swig + swig -c++ -I/usr/local/include/mlt++ `mlt-config --cflags` -python mltpp.i || exit $? + + # Compile the wrapper + g++ -D_GNU_SOURCE -c -rdynamic -pthread `mlt-config --cflags` -I$PYTHON_INCLUDE mltpp_wrap.cxx || exit $? + + # Create the module + ld -shared mltpp_wrap.o -lmlt++ -o _mltpp.so || exit $? +else + echo Python not installed. + exit 1 +fi