[vlc-devel] commit: Remove internal Python build support ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed May 21 19:46:43 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed May 21 20:48:11 2008 +0300| [b6b695f1884564441499b817246a1c0536c23225]

Remove internal Python build support

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

 Makefile.am                 |    4 ---
 bindings/python/Makefile.am |   25 ----------------------
 bindings/python/setup.py    |   20 ++---------------
 configure.ac                |   47 ++++++++++++++++--------------------------
 4 files changed, 21 insertions(+), 75 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4100c84..6883305 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,7 +9,6 @@
 #  - libs/* are needed by modules
 BASE_SUBDIRS = po src modules share doc test
 EXTRA_SUBDIRS = m4 extras/package/ipkg \
-	bindings/python \
 	libs/loader libs/srtp \
 	projects/mozilla projects/activex
 DIST_SUBDIRS = $(BASE_SUBDIRS) $(EXTRA_SUBDIRS)
@@ -28,9 +27,6 @@ endif
 if BUILD_ACTIVEX
 SUBDIRS += projects/activex
 endif
-if BUILD_PYTHON
-SUBDIRS += bindings/python
-endif
 
 EXTRA_DIST = \
 	HACKING \
diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
deleted file mode 100644
index f62efd2..0000000
--- a/bindings/python/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-##############################################################################
-# Building the Python binding
-###############################################################################
-
-EXTRA_DIST = vlcglue.h setup.py vlcwrapper.py vlcwidget.py \
-	vlc_module.c \
-	vlc_media.c vlc_position.c \
-	vlc_instance.c vlc_mediaplayer.c
-
-if BUILD_PYTHON
-
-all:
-if HAVE_WIN32
-	COMPILERARG=--compiler=mingw32
-else
-	COMPILERARG=
-endif
-	srcdir="`cd $(srcdir);pwd`" top_builddir="$(abs_top_builddir)" python "$(srcdir)/setup.py" build $(COMPILERARG)
-
-install:
-	top_builddir="$(abs_top_builddir)" srcdir="`cd $(srcdir);pwd`" python $(srcdir)/setup.py install
-
-clean:
-	$(RM) -rf build
-endif
diff --git a/bindings/python/setup.py b/bindings/python/setup.py
index df71e02..018e080 100644
--- a/bindings/python/setup.py
+++ b/bindings/python/setup.py
@@ -2,16 +2,8 @@ from distutils.core import setup, Extension
 import os
 
 # Get build variables (buildir, srcdir)
-try:
-    top_builddir=os.environ['top_builddir']
-except KeyError:
-    # Note: do not initialize here, so that we get
-    # a correct default value if the env. var is
-    # defined but empty
-    top_builddir=None
-if not top_builddir:
-    top_builddir = os.path.join( '..', '..' )
-    os.environ['top_builddir'] = top_builddir
+top_builddir = os.path.join( '..', '..' )
+os.environ['top_builddir'] = top_builddir
 
 # Determine the extra link args. Normally, vlc-config should take care
 # of this and return the right path values, from a development tree or
@@ -30,13 +22,7 @@ else:
         linkargs=[ '-L' + d ]
 
 # For out-of-tree compilations
-try:
-    srcdir=os.environ['srcdir']
-except KeyError:
-    # Note: same as above
-    srcdir=None
-if not srcdir:
-    srcdir = '.'
+srcdir = '.'
 
 def get_vlcconfig():
     vlcconfig=None
diff --git a/configure.ac b/configure.ac
index a0c5236..d7060c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,24 @@ AS_IF([test "x${enable_maintainer_mode}" != "xno"],
 AM_MAINTAINER_MODE
 
 dnl
+dnl  Deprecated options
+dnl  to notify packagers that stuff has changed
+dnl
+AC_ARG_ENABLE(python-bindings,
+  [  --enable-python-bindings Always fails for historical reasons)],,
+  [enable_python_bindings="no"])
+AS_IF([test "${enable_python_bindings}" != "no"], [
+  AC_MSG_ERROR([Python bindings are now built from a separate source package])
+])
+
+AC_ARG_ENABLE(java-bindings,
+  [  --enable-java-bindings  Always fails for historical reasons],,
+  [enable_java_bindings="no"])
+AS_IF([test "${enable_java_bindings}" != "no"], [
+  AC_MSG_ERROR([Java bindings are now built from a separate source package])
+])
+
+dnl
 dnl  Save *FLAGS
 dnl
 VLC_SAVE_FLAGS
@@ -6146,34 +6164,6 @@ AC_CHECK_LIB(Xsp, XSPSetPixelDoubling,[
 ])
 
 dnl
-dnl  Mediacontrol Python bindings
-dnl
-AC_ARG_ENABLE(python-bindings,
-  [  --enable-python-bindings Enable Python bindings (default disabled)])
-
-if test "${enable_python_bindings}" = "yes"; then
-  AC_PATH_PROG(PYTHON_CONFIG, python-config, no)
-  CFLAGS="${CFLAGS_save} `${PYTHON_CONFIG} --cflags`"
-  AC_CHECK_HEADER([Python.h],
-    PLUGINS_BINDINGS="${PLUGINS_BINDINGS} python",
-    AC_MSG_ERROR([You have to install python-dev to build the bindings]),
-    []
-  )
-  CFLAGS="${CFLAGS_save}"
-fi
-AM_CONDITIONAL(BUILD_PYTHON, [test "${enable_python_bindings}" = "yes"])
-
-dnl
-dnl  Java bindings
-dnl
-AC_ARG_ENABLE(java-bindings,
-  [  --enable-java-bindings  Always fail for historical reasons],,
-  [enable_java_bindings="no"])
-AS_IF([test "${enable_java_bindings}" != "no"], [
-  AC_MSG_ERROR([Java bindings are now built from a separate source package])
-])
-
-dnl
 dnl  test plugins
 dnl
 AC_ARG_ENABLE(testsuite,
@@ -6248,7 +6238,6 @@ then
     VLC_ADD_LDFLAGS([qte_main],[${LDFLAGS_qte} ${LDFLAGS_qt_video}])
 fi
 
-
 dnl
 dnl  Plugin and builtin checks
 dnl




More information about the vlc-devel mailing list