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()
24 cflags.append( "-D__LIBVLC__")
28 vlcconfig=get_vlcconfig()
32 os.environ['top_builddir'] = '..'
34 if os.sys.platform == 'darwin':
35 ldflags = "-read_only_relocs warning".split()
36 ldflags.extend(os.popen('%s --libs vlc builtin' % vlcconfig, 'r').readline().rstrip().split())
37 if os.sys.platform == 'darwin':
38 ldflags.append('-lstdc++')
41 # To compile in a local vlc tree
42 native_libvlc_test = Extension( 'native_libvlc_test',
43 sources = ['native/init.c', 'native/url.c', 'native/i18n.c',
44 'native/stats.c', 'native/libvlc.c', 'native/profiles.c',
45 'native/algo.c', 'native/threads.c'],
46 include_dirs = ['../include', '../', '/usr/win32/include' ],
47 extra_objects = [ '../src/.libs/libvlc.so', '../src/.libs/libvlc-control.so' ],
48 extra_compile_args = get_cflags(),
49 extra_link_args = [ '-L../..' ] + get_ldflags(),
52 native_gc_test = Extension( 'native_gc_test',
53 sources = ['native/gc.c'],
54 include_dirs = ['../include', '../', '/usr/win32/include' ],
55 extra_objects = [ '../src/.libs/libvlc.so' ],
56 extra_compile_args = get_cflags(),
57 extra_link_args = [ '-L../..' ] + get_ldflags(),
60 setup( name = 'native_libvlc_test' ,version = '1242', ext_modules = [ native_libvlc_test ] )
63 setup( name = 'native_gc_test' ,version = '1242', ext_modules = [ native_gc_test ] )