Don't generate Python bindings by default
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 25 Sep 2013 18:21:47 +0000 (14:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 13 Nov 2013 02:57:17 +0000 (21:57 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
README
configure.ac
doc/python-howto.txt

diff --git a/README b/README
index ce98e24dc01e23f90a4c4e2bac6c4b87c3c9c4d3..d76d69809b175d8714e73d8f1c15a9be40af688b 100644 (file)
--- a/README
+++ b/README
@@ -25,8 +25,6 @@ BUILDING
        make install
        ldconfig
 
-       If you do not want Python bindings, run ./configure --disable-python.
-
 DEPENDENCIES
 ------------
 
@@ -46,12 +44,18 @@ To compile Babeltrace, you will need:
          (Debian : libpopt-dev)
          (Fedora : popt)
        python headers (optional)
-         (Debian/Ubuntu : python-dev)
+         (Debian/Ubuntu : python3-dev)
        swig >= 2.0 (optional)
          (Debian/Ubuntu : swig2.0)
        python 3.0 or better (optional)
          (Debian/Ubuntu : python3)
 
+  If you want Python bindings, run ./configure --enable-python-bindings.
+  Please note that some distributions will need the following
+  environment variables set before running configure:
+
+    export PYTHON="python3"
+    export PYTHON_CONFIG="/usr/bin/python3-config"
 
 For developers using the git tree:
 
index 637daa56761370c9a7c19f5f45e5ada72d396b4a..1b927ff08ac134fcba155846ea47162a69ad506d 100644 (file)
@@ -106,17 +106,14 @@ AC_CHECK_LIB([popt], [poptGetContext], [],
 # SWIG version needed or newer:
 swig_version=2.0.0
 
-AC_ARG_ENABLE([python],
-              [AC_HELP_STRING([--disable-python],
-                              [do not compile Python bindings])],
-              [], [enable_python=yes])
+AC_ARG_ENABLE([python-bindings],
+              [AC_HELP_STRING([--enable-python-bindings],
+                              [generate Python bindings])],
+              [enable_python=yes], [enable_python=no])
 
 AM_CONDITIONAL([USE_PYTHON], [test "x${enable_python:-yes}" = xyes])
 
 if test "x${enable_python:-yes}" = xyes; then
-  AC_MSG_NOTICE([You may configure with --disable-python ]dnl
-[if you do not want Python bindings.])
-
   AX_PKG_SWIG($swig_version, [], [ AC_MSG_ERROR([SWIG $swig_version or newer is needed]) ])
   AM_PATH_PYTHON
 
@@ -128,12 +125,17 @@ if test "x${enable_python:-yes}" = xyes; then
                     [python$PYTHON_VERSION-config python-config],
                     [no],
                     [`dirname $PYTHON`])
-      AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON.])])
+      AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON. Do you have python-dev installed?])])
     ])
     AC_MSG_CHECKING([python include flags])
     PYTHON_INCLUDE=`$PYTHON_CONFIG --includes`
     AC_MSG_RESULT([$PYTHON_INCLUDE])
   ])
+
+else
+    AC_MSG_NOTICE([You may configure with --enable-python-bindings ]dnl
+[if you want Python bindings.])
+
 fi
 
 pkg_modules="gmodule-2.0 >= 2.0.0"
index e2ed7519b1e1eda0da09c83442b7b7e3ba29de30..5ac8e078db4a4e2c52d2f692b8aa8ca25f999f1c 100644 (file)
@@ -6,11 +6,11 @@ This is a brief howto for using the Babeltrace Python module.
 
 INSTALLATION:
 
-By default, the Python bindings are installed.
-If you do not wish the Python bindings, you can configure with the
---disable-python option during the installation procedure:
+By default, the Python bindings are not generated.
+If you wish to generate and install the Python bindings, you can use the
+--enable-python-bindings configure option.
 
-  $ ./configure --disable-python
+  $ ./configure --enable-python-bindings
 
 The Python module is automatically generated using SWIG, therefore the
 swig2.0 package on Debian/Ubuntu is requied.
This page took 0.035646 seconds and 4 git commands to generate.