Fix out of tree building of the python bindings
authorRafaël Carré <funman@videolan.org>
Tue, 18 Mar 2008 08:26:27 +0000 (09:26 +0100)
committerRafaël Carré <funman@videolan.org>
Tue, 18 Mar 2008 08:27:19 +0000 (09:27 +0100)
bindings/python/Makefile.am
bindings/python/setup.py

index 5a6990e..5ab1b08 100644 (file)
@@ -15,12 +15,10 @@ if HAVE_WIN32
 else
        COMPILERARG=
 endif
-       srcdir="$(srcdir)" top_builddir="$(top_builddir)" python "$(srcdir)/setup.py" build $(COMPILERARG) "--build-base=$(top_builddir)/bindings/python" "--build-temp=$(top_builddir)/bindings/python"
+       srcdir="`cd $(srcdir);pwd`" top_builddir="$(abs_top_builddir)" python "$(srcdir)/setup.py" build $(COMPILERARG)
 
-# 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
 install:
-       python $(srcdir)/setup.py install
+       top_builddir="$(abs_top_builddir)" srcdir="`cd $(srcdir);pwd`" python $(srcdir)/setup.py install
 
 clean:
        $(RM) -rf build
index 5589b7f..a079c10 100644 (file)
@@ -92,12 +92,12 @@ source_files = [ 'vlc_module.c' ]
 
 # To compile in a local vlc tree
 vlclocal = Extension('vlc',
-                     sources = [ os.path.join( srcdir, f ) for f in source_files ],
-                     include_dirs = [ top_builddir,
-                                      os.path.join( srcdir, '..', '..', 'include' ),
-                                      srcdir,
-                                      '/usr/win32/include' ],
-                extra_objects = [ ],
+               sources = [ os.path.join( srcdir, f ) for f in source_files ],
+               include_dirs = [ top_builddir,
+                             os.path.join( srcdir, '..', '..', 'include' ),
+                             srcdir,
+                             '/usr/win32/include' ],
+               extra_objects = [ ],
                 extra_compile_args = get_cflags(),
                extra_link_args = linkargs + get_ldflags(),
                 )