Commit d7d799b8 authored by Christophe Mutricy's avatar Christophe Mutricy

That should fix building the python bindings if srcdir =! builddir.

Not thorougly tested. Olivier reverts this commit without hesitation if it breaks your stuffs
parent d3a4dc86
......@@ -16,7 +16,7 @@ else
endif
all:
srcdir="$(srcdir)" top_builddir="$(top_builddir)" python "$(srcdir)/setup.py" build $(COMPILERARG) "--build-base=$(top_builddir)/bindings/mediacontrol-python" "--build-temp=$(top_builddir)/bindings/mediacontrol-python"
top_srcdir="$(top_srcdir)" top_builddir="$(top_builddir)" python "$(srcdir)/setup.py" build $(COMPILERARG) "--build-base=$(top_builddir)/bindings/mediacontrol-python" "--build-temp=$(top_builddir)/bindings/mediacontrol-python"
# FIXME: python setup.py install does not have any option to install from a different build directory
# so this will not work in a separate builddir
......
......@@ -14,15 +14,17 @@ if not top_builddir:
os.environ['top_builddir'] = top_builddir
try:
srcdir=os.environ['srcdir']
top_srcdir=os.environ['top_srcdir']
except KeyError:
# Note: same as above
srcdir=None
if not srcdir:
srcdir = '.'
if not top_srcdir:
top_srcdir = os.path.join( '..', '..' )
os.environ['top_srcdir'] = top_srcdir
vlclib="-lvlc"
vlclib= "-L" + os.path.join( top_builddir, 'src') + " -lvlc"
picflag=''
srcdir=os.path.join( top_srcdir, 'bindings', 'mediacontrol-python' )
def get_vlcconfig():
vlcconfig=None
......@@ -77,7 +79,7 @@ source_files = [ 'vlc_module.c' ]
vlclocal = Extension('vlc',
sources = [ os.path.join( srcdir, f ) for f in source_files ],
include_dirs = [ top_builddir,
os.path.join( top_builddir, 'include' ),
os.path.join( top_srcdir, 'include' ),
srcdir,
'/usr/win32/include' ],
extra_objects = [ vlclib ],
......
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