From: Jérémie Galarneau Date: Wed, 25 Sep 2013 18:21:47 +0000 (-0400) Subject: Don't generate Python bindings by default X-Git-Tag: v1.2.0-rc1~53 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=94a6cea3f1639fb0c71b1c591af7880af7507fc0 Don't generate Python bindings by default Signed-off-by: Jérémie Galarneau --- diff --git a/README b/README index ce98e24d..d76d6980 100644 --- 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: diff --git a/configure.ac b/configure.ac index 637daa56..1b927ff0 100644 --- a/configure.ac +++ b/configure.ac @@ -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" diff --git a/doc/python-howto.txt b/doc/python-howto.txt index e2ed7519..5ac8e078 100644 --- a/doc/python-howto.txt +++ b/doc/python-howto.txt @@ -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.