1 from distutils.core import setup,Extension
6 for n in ( 'vlc-config',
7 os.path.sep.join( ( '..', 'vlc-config' ))):
12 print "*** Warning *** Cannot find vlc-config"
13 elif os.sys.platform == 'win32':
14 # Win32 does not know how to invoke the shell itself.
15 vlcconfig="sh %s" % vlcconfig
19 vlcconfig=get_vlcconfig()
23 cflags=os.popen('%s --cflags' % vlcconfig, 'r').readline().rstrip().split()
27 vlcconfig=get_vlcconfig()
31 os.environ['top_builddir'] = '..'
33 if os.sys.platform == 'darwin':
34 ldflags = "-read_only_relocs warning".split()
35 ldflags.extend(os.popen('%s --libs vlc pic builtin' % vlcconfig, 'r').readline().rstrip().split())
36 if os.sys.platform == 'darwin':
37 ldflags.append('-lstdc++')
40 # To compile in a local vlc tree
41 native_libvlc_test = Extension( 'native_libvlc_test',
42 sources = ['native/libvlc.c'],
43 include_dirs = ['../include', '../', '/usr/win32/include' ],
44 extra_objects = [ '../lib/libvlc_pic.a' ],
45 extra_compile_args = get_cflags(),
46 extra_link_args = [ '-L../..' ] + get_ldflags(),
49 native_stats_test = Extension( 'native_stats_test',
50 sources = ['native/stats.c'],
51 include_dirs = ['../include', '../', '/usr/win32/include' ],
52 extra_objects = [ '../lib/libvlc_pic.a' ],
53 extra_compile_args = get_cflags(),
54 extra_link_args = [ '-L../..' ] + get_ldflags(),
58 setup( name = 'native_libvlc_test' ,version = '1242', ext_modules = [ native_libvlc_test ] )
59 setup( name = 'native_stats_test' ,version = '1242', ext_modules = [ native_stats_test ] )