[vlc-devel] commit: python bindings: indicate that old python bindings are deprecated. (Olivier Aubert )

git version control git at videolan.org
Tue Dec 8 10:42:30 CET 2009


vlc | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Tue Dec  8 10:41:05 2009 +0100| [97d17c81282ca1d21e7eb4109937a5ebdc271a83] | committer: Olivier Aubert 

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.

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

 bindings/python/README   |   16 ++++++++++++++++
 bindings/python/setup.py |   17 +++++++++++++++++
 2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/bindings/python/README b/bindings/python/README
index b897744..bd26c2f 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 88e18fc..4f6afc0 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' ]




More information about the vlc-devel mailing list