From 97d17c81282ca1d21e7eb4109937a5ebdc271a83 Mon Sep 17 00:00:00 2001 From: Olivier Aubert Date: Tue, 8 Dec 2009 10:41:05 +0100 Subject: [PATCH] python bindings: indicate that old python bindings are deprecated. To build the old version, you have to pass the --force-deprecated option to the setup.py script. --- bindings/python/README | 16 ++++++++++++++++ bindings/python/setup.py | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/bindings/python/README b/bindings/python/README index b897744fcd..bd26c2f84b 100644 --- a/bindings/python/README +++ b/bindings/python/README @@ -1,3 +1,19 @@ +******************************************** + IMPORTANT NOTE +******************************************** + +This native version of VLC bindings is now deprecated. Please use the +new ctypes-based bindings, which can be found in the +bindings/python-ctypes directory of the VLC source tree. + + + + + + + + + * Testing If you try to compile the bindings from a development tree, you will diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 88e18fc359..4f6afc00d6 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -1,3 +1,4 @@ +import sys from distutils.core import setup, Extension import os import commands @@ -76,6 +77,22 @@ def get_ldflags(): ldflags.append('-lvlc') return ldflags +# Import +if '--force-deprecated' in sys.argv: + sys.argv.remove('--force-deprecated') +else: + print """This native version of VLC bindings is now deprecated. + +Please use the new ctypes-based bindings, which can be built from the +bindings/python-ctypes directory of the VLC source tree, or directly +get the generated python module from +http://www.advene.org/download/python-ctypes + +However, if you insist on building this deprecated version, you should +pass the --force-deprecated option on the setup.py command line. +""" + sys.exit(1) + #source_files = [ 'vlc_module.c', 'vlc_mediacontrol.c', # 'vlc_position.c', 'vlc_instance.c', 'vlc_input.c' ] source_files = [ 'vlc_module.c' ] -- 2.39.2