Commit c2d31f45 authored by Olivier Aubert's avatar Olivier Aubert

python/bindings/setup.py: fix python binding building (ref. r17640)

parent 989bdaf6
...@@ -21,9 +21,6 @@ except KeyError: ...@@ -21,9 +21,6 @@ except KeyError:
if not srcdir: if not srcdir:
srcdir = '.' srcdir = '.'
vlclib="-lvlc"
picflag=''
def get_vlcconfig(): def get_vlcconfig():
vlcconfig=None vlcconfig=None
for n in ( 'vlc-config', for n in ( 'vlc-config',
...@@ -51,7 +48,7 @@ def get_cflags(): ...@@ -51,7 +48,7 @@ def get_cflags():
if vlcconfig is None: if vlcconfig is None:
return [] return []
else: else:
cflags=os.popen('%s --cflags' % vlcconfig, 'r').readline().rstrip().split() cflags=os.popen('%s --cflags vlc' % vlcconfig, 'r').readline().rstrip().split()
return cflags return cflags
def get_ldflags(): def get_ldflags():
...@@ -62,8 +59,7 @@ def get_ldflags(): ...@@ -62,8 +59,7 @@ def get_ldflags():
ldflags = [] ldflags = []
if os.sys.platform == 'darwin': if os.sys.platform == 'darwin':
ldflags = "-read_only_relocs warning".split() ldflags = "-read_only_relocs warning".split()
ldflags.extend(os.popen('%s --libs vlc %s' % (vlcconfig, ldflags.extend(os.popen('%s --libs vlc external' % vlcconfig,
picflag),
'r').readline().rstrip().split()) 'r').readline().rstrip().split())
if os.sys.platform == 'darwin': if os.sys.platform == 'darwin':
ldflags.append('-lstdc++') ldflags.append('-lstdc++')
...@@ -80,9 +76,9 @@ vlclocal = Extension('vlc', ...@@ -80,9 +76,9 @@ vlclocal = Extension('vlc',
os.path.join( srcdir, '..', '..', 'include' ), os.path.join( srcdir, '..', '..', 'include' ),
srcdir, srcdir,
'/usr/win32/include' ], '/usr/win32/include' ],
extra_objects = [ vlclib ], extra_objects = [ ],
extra_compile_args = get_cflags(), extra_compile_args = get_cflags(),
extra_link_args = [ '-L' + os.path.join(top_builddir, 'src') ] + get_ldflags(), extra_link_args = [ '-L' + os.path.join(top_builddir, 'src', '.libs') ] + get_ldflags(),
) )
setup (name = 'VLC Bindings', setup (name = 'VLC Bindings',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment