#!/usr/bin/python import os, sys sys.path.append("..") import rpythonic if sys.argv[-1].startswith("--output="): rpythonic.set_cache(sys.argv[-1].split("=")[-1]) else: rpythonic.set_cache("../examples") ALL = "--all" in sys.argv debug = 0 if "--emokit" in sys.argv or ALL: # apt-get install libmcrypt-dev liboscpack-dev # git clone http://github.com/qdot/emokit.git rpythonic.wrap("emokit", header="/usr/local/include/libepoc.h", library="/usr/local/lib/libepoc.so") if "--python3" in sys.argv or ALL: footer = "PyRun_SimpleString = PyRun_SimpleStringFlags" rpythonic.wrap( "python3", header="/usr/include/python3.2/Python.h", library="/usr/lib/libpython3.2mu.so", ctypes_footer=footer ) if "--ogre" in sys.argv: defines = [] ignore_ogre = "MeshSerializerImpl MeshSerializerImpl_v1_4 MeshSerializerImpl_v1_3 MeshSerializerImpl_v1_2 MeshSerializerImpl_v1_1 InstancedGeometry::MaterialBucket MaterialBucket ScriptCompiler StringUtil".split()
#!/usr/bin/python import os, sys sys.path.append('..') import rpythonic if sys.argv[-1].startswith('--output='): rpythonic.set_cache(sys.argv[-1].split('=')[-1]) else: rpythonic.set_cache('../examples') GINCLUDE = [ '/usr/include/glib-2.0/', '/usr/lib/glib-2.0/include/', '/usr/include/cairo/', '/usr/include/pango-1.0/', '/usr/include/atk-1.0/', '/usr/include/gdk-pixbuf-2.0/', '/usr/lib/i386-linux-gnu/glib-2.0/include/', # glibconfig.h '/usr/lib/x86_64-linux-gnu/glib-2.0/include/', # 64bits ] glibfooter = open('glibfooter.py', 'rb').read() gtkfooter = open('gtkfooter.py', 'rb').read() if '--gtk3' in sys.argv: rpythonic.wrap( 'gtk3', # do not use "gtk" (already used by old pygtk) header='/usr/include/gtk-3.0/gtk/gtk.h', library='/usr/lib/libgtk-3.so', includes=['/usr/include/gtk-3.0/'] + GINCLUDE, #defines=['__G_THREAD_H__', '__G_ASYNCQUEUE_H__'],
#!/usr/bin/python ''' apt-get install python-ply http://code.google.com/p/rpythonic/ http://dist.schmorp.de/libev/libev-4.11.tar.gz make and make install - you should then have /usr/local/lib/libev.so ''' import os, sys sys.path.append('../../rpythonic') import rpythonic rpythonic.set_cache('../.') rpythonic.wrap( 'libev', header='/usr/local/include/ev.h', library_names=['libev'], strip_prefixes=['ev_', 'EV_'], ctypes_footer=open('ctypes-footer.py', 'rb').read(), )
#!/usr/bin/python # updated may9th 2011 # trick, the head will contain many sub rects, but the bounding points to not touch # while the hand will have many rects with touching bounding points. import os, sys, ctypes, thread if '..' not in sys.path: sys.path.append('..') import rpythonic rpythonic.set_cache('../cache') freenect = rpythonic.module('libfreenect_sync') assert freenect cvaux = rpythonic.module('cvaux') assert cvaux gui = rpythonic.module('highgui', secondary=cvaux) assert gui cv = rpythonic.module('cv', secondary=gui) assert cv import time IPL_DEPTH_16S = 2147483664 IPL_DEPTH_8S = 2147483656 CV_WHOLE_SEQ = cv.CvSlice(0, 9999999) lock = thread.allocate_lock() class Shape(object): HAND = None storage_hull = cv.CreateMemStorage(0)
#!/usr/bin/python import os, sys sys.path.append('..') import rpythonic rpythonic.set_cache( '../cache' ) rpythonic.set_pypy_root( '../../pypy' ) ################################ ## requires iOS headers ## USR_INC = SDK_ROOT = '../../ios-sdk-2.0/' assert os.path.isdir( SDK_ROOT ) includes = ['./ios-hacks'] defines = ['TARGET_OS_IPHONE', '__arm__', '__LITTLE_ENDIAN__', '__GNUC__', '__APPLE_CPP__', '_ANSI_SOURCE'] undefines = ['__i386__', '__x86_64__'] library = '<undefined>' name = 'GLES' header = os.path.join(os.path.join( USR_INC, 'OpenGLES' ), 'ES1') header = os.path.join( header, 'glext.h' ) # glext superset of gl.h #library = os.path.join( USR_LIB, 'libGLESv1_CM.so' ) rpythonic.wrap( name, header=header, library=library, includes=includes, system_include=USR_INC, defines=defines, ctypes=False, platform='iOS' ) name = 'OpenAL' header = os.path.join(os.path.join( USR_INC, name ), 'al.h')
#!/usr/bin/python import os, sys sys.path.append('..') import rpythonic if sys.argv[-1].startswith('--output='): rpythonic.set_cache( sys.argv[-1].split('=')[-1] ) else: rpythonic.set_cache('../examples' ) GINCLUDE = [ '/usr/include/glib-2.0/', '/usr/lib/glib-2.0/include/', '/usr/include/cairo/', '/usr/include/pango-1.0/', '/usr/include/atk-1.0/', '/usr/include/gdk-pixbuf-2.0/', '/usr/lib/i386-linux-gnu/glib-2.0/include/', # glibconfig.h '/usr/lib/x86_64-linux-gnu/glib-2.0/include/', # 64bits ] glibfooter = open( 'glibfooter.py', 'rb' ).read() gtkfooter = open( 'gtkfooter.py', 'rb' ).read() if '--gtk3' in sys.argv: rpythonic.wrap( 'gtk3', # do not use "gtk" (already used by old pygtk) header='/usr/include/gtk-3.0/gtk/gtk.h', library='/usr/lib/libgtk-3.so', includes=['/usr/include/gtk-3.0/'] + GINCLUDE,