]> git.sesse.net Git - vlc/blobdiff - bindings/python/setup.py
cil binding: typo.
[vlc] / bindings / python / setup.py
index e26f71528d629b9c14ef5cb48a6deb187ada4a67..4f6afc00d6db5cadb08e50d457f560648a015950 100644 (file)
@@ -1,3 +1,4 @@
+import sys
 from distutils.core import setup, Extension
 import os
 import commands
@@ -70,8 +71,28 @@ def get_ldflags():
                                 'r').readline().rstrip().split())
        if os.sys.platform == 'darwin':
            ldflags.append('-lstdc++')
+        if not '-lvlc' in ldflags:
+            # Some broken vlc-config can exist (esp. on win32). Try to
+            # workaround the problem.
+            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' ]