Howto build python bindings for Ubuntu

Gutsy Gibbon?

Run the following as root. Be sure that you have source URIs in your sources.list, otherwise copy them from http://www.ubuntu-nl.org/source-o-matic/

apt-get build-dep vlc

apt-get source vlc



cd vlc-0.8.6.release.c

./configure --prefix=/usr/ --enable-wxwindows --disable-mad

make install



cd bindings/mediacontrol-python

python setup.py install

Hardy Heron

To build the python bindings on Ubuntu, use the following procedure:

  1. apt-get build-dep vlc
  2. apt-get source vlc
  3. Edit topsourcedir/debian/rules and add
        --enable-mediacontrol-python-bindings
    
    
    to the vlc_confflags variable
  4. cd topsourcedir/debian
  5. debuild
  6. The build will fail. Then
    cd topsourcedir
    
    vi Makefile
    
    # remove "bindings" from SUBDIRS variable
    
    make
    
    
  7. Once VLC has been built
    cd topsourcedir/bindings/mediacontrol-python
    
    make
    
    
  8. This command will fail, as it cannot find some libs. Apparently debuild does a shared-lib build and the "python setup.py build" command expects a static-lib build. Copy the gcc command and change the library paths to the correct ones. In general, this means adding .libs/ before the library name and changing .a to _builtin.a.
  9. You'll find the Python module vlc.so in lib.linux-<arch>-2.5/vlc.so

Note: a ready package is available from:

deb http://ubuntu.p2p-next.org hardy main

Intrepid Ibex

  1. Run the following commands
    sudo apt-get install libvlc-dev git-core python-dev
    
    cd /tmp
    
    git clone git://git.videolan.org/vlc.git
    
    cd vlc/bindings/python/
    
    python setup.py build  
    
    sudo python setup.py install  
    
    

You may need to set the LD_LOAD_LIBRARY_PATH environment variable to prevent the created vlc.so from using the official /usr/lib VLC libraries instead of the ones you just built.

Alternatively, for 32-bit Ubuntu 8.10 binary packages are available at:

wget http://liris.cnrs.fr/advene/download/linux/python-vlc_0.9.0-1_i386.deb

wget http://liris.cnrs.fr/advene/download/linux/vlc-pluginsvg_0.9.0-1_i386.deb

We don't official support these packages, sorry.