diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-02-25 10:49:08 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-02-26 11:52:32 +0100 |
commit | e0aca18f687e9f49223ffb24b9be354bed4b150a (patch) | |
tree | f4d87d40ae17775e4e3c744476d31d56b5dba64b /build/linux/configure.ac | |
parent | 22f0c35dd2576b0121992ab09fe89e68c6532459 (diff) | |
download | astra-e0aca18f687e9f49223ffb24b9be354bed4b150a.tar.gz astra-e0aca18f687e9f49223ffb24b9be354bed4b150a.tar.bz2 astra-e0aca18f687e9f49223ffb24b9be354bed4b150a.tar.xz astra-e0aca18f687e9f49223ffb24b9be354bed4b150a.zip |
Add logging for python module checks
Diffstat (limited to 'build/linux/configure.ac')
-rw-r--r-- | build/linux/configure.ac | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/build/linux/configure.ac b/build/linux/configure.ac index 525ca9d..b97a7a0 100644 --- a/build/linux/configure.ac +++ b/build/linux/configure.ac @@ -180,26 +180,30 @@ if test x"$with_python" != x -a x"$with_python" != xno; then HAVEPYTHON=yes AC_SUBST(PYTHON) AC_MSG_CHECKING(for numpy module) - echo "import numpy" | $PYTHON - - if test $? -ne 0 ; then - AC_MSG_RESULT(not found) + ASTRA_TRY_PYTHON([import numpy],,HAVEPYTHON=no) + if test x$HAVEPYTHON = xno; then + AC_MSG_RESULT(no) AC_MSG_ERROR(You need the numpy module to use the ASTRA toolbox in Python) fi - AC_MSG_RESULT(found) + AC_MSG_RESULT(yes) AC_MSG_CHECKING(for Cython module) - echo "import Cython;from distutils.version import LooseVersion;assert(LooseVersion(Cython.__version__)>=LooseVersion('0.13'))" | $PYTHON - - if test $? -ne 0 ; then - AC_MSG_RESULT(not found) + ASTRA_TRY_PYTHON([ +import Cython +from distutils.version import LooseVersion +assert(LooseVersion(Cython.__version__)>=LooseVersion("0.13")) +],,HAVEPYTHON=no) + if test x$HAVEPYTHON = xno; then + AC_MSG_RESULT(no) AC_MSG_ERROR(You need the Cython module (version >=0.13) to use the ASTRA toolbox in Python) fi - AC_MSG_RESULT(found) + AC_MSG_RESULT(yes) AC_MSG_CHECKING(for six module) - echo "import six" | $PYTHON - - if test $? -ne 0 ; then - AC_MSG_RESULT(not found) + ASTRA_TRY_PYTHON([import six]) + if test x$HAVEPYTHON = xno; then + AC_MSG_RESULT(no) AC_MSG_ERROR(You need the six module to use the ASTRA toolbox in Python) fi - AC_MSG_RESULT(found) + AC_MSG_RESULT(yes) fi AC_SUBST(HAVEPYTHON) |