]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: pylibmount will not work when python3 is present
authorSami Kerola <kerolasa@iki.fi>
Mon, 26 Aug 2013 12:11:44 +0000 (13:11 +0100)
committerSami Kerola <kerolasa@iki.fi>
Thu, 29 Aug 2013 17:14:06 +0000 (18:14 +0100)
While compiling with up to date Archlinux I notice the recently added
pylibmount does not link correctly.  Failures inform fundamental types
such as PyFileObject and PyFile_Type being missing.

It seems automake AM_PATH_PYTHON will prefer the python in path, which
for this distribution right now is python3.  As some sort of go-around
one can install older python, and symlink it to earlier in PATH lookup.

$ ln -s /usr/bin/python2 $HOME/bin/python
$ export PATH=$HOME/bin:$PATH

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
configure.ac

index a0a72fd2979ecbfa792d05a4107a877535212c99..d24ed8f7f80dbd2210c29979ac24b9cc9b3c5fb2 100644 (file)
@@ -1387,6 +1387,12 @@ AS_IF([test "x$with_python" = xyes], [
   ])
 ])
 
+dnl FIXME: the python3 should be fixed in future.
+AS_CASE([$PYTHON_VERSION],
+       [2.*], [],
+       [3.*], [AC_MSG_ERROR([pylibmount will not work with python3])],
+       [AC_MSG_ERROR([unanticipated python version])]
+)
 
 UL_BUILD_INIT([pylibmount], [check])
 UL_REQUIRES_HAVE([pylibmount], [python])