[vlc-devel] commit: Fix out of tree building of the python bindings ( Rafaël Carré )

git version control git at videolan.org
Tue Mar 18 09:29:45 CET 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Mar 18 09:26:27 2008 +0100| [03dbdfe7b9bc3d749435c27cc01d0606f411a4e1]

Fix out of tree building of the python bindings

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=03dbdfe7b9bc3d749435c27cc01d0606f411a4e1
---

 bindings/python/Makefile.am |    6 ++----
 bindings/python/setup.py    |   12 ++++++------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
index 5a6990e..5ab1b08 100644
--- a/bindings/python/Makefile.am
+++ b/bindings/python/Makefile.am
@@ -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
diff --git a/bindings/python/setup.py b/bindings/python/setup.py
index 5589b7f..a079c10 100644
--- a/bindings/python/setup.py
+++ b/bindings/python/setup.py
@@ -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(),
                 )




More information about the vlc-devel mailing list