From: Mathias Preiner Date: Fri, 27 Jul 2018 19:50:47 +0000 (-0700) Subject: Make Python a required CVC4 dependency. (#2227) X-Git-Tag: cvc5-1.0.0~4850 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1832d76aaacd9b19e4b6bdb0549579a6eda5b1a4;p=cvc5.git Make Python a required CVC4 dependency. (#2227) Python is required for generating the options code. The dependency is now required. Now autoconf searches for a Python version >= 2.7 and sets the corresponding environment variables. mkoptions.py is now called with $(PYTHON). This fixes the broken competition and windows nightly builds. --- diff --git a/configure.ac b/configure.ac index 9ec9923c0..1480879c8 100644 --- a/configure.ac +++ b/configure.ac @@ -1142,19 +1142,10 @@ AM_CONDITIONAL([HAVE_CXXTESTGEN], [test -n "$CXXTESTGEN"]) AC_ARG_VAR(PERL, [PERL interpreter (used when testing)]) -AC_ARG_VAR(PYTHON, [PYTHON interpreter (used for building legacy Java library interface)]) - -if test -z "$PYTHON"; then - AC_CHECK_PROGS(PYTHON, python, python, []) -else - AC_CHECK_PROG(PYTHON, "$PYTHON", "$PYTHON", []) -fi - -if test -z "$PYTHON"; then - AC_MSG_WARN([python not found, cannot build libcvc4compat_java (the legacy Java interface).]) - CXXTESTGEN= - CXXTEST= -fi +# Python is now a required dependency for generating options code +AM_PATH_PYTHON([2.7],, [ + AC_MSG_ERROR([Python not found.]) +]) # Checks for libraries. diff --git a/src/options/Makefile.am b/src/options/Makefile.am index edcc9eb9c..c311e04d8 100644 --- a/src/options/Makefile.am +++ b/src/options/Makefile.am @@ -149,7 +149,7 @@ $(CPP_TEMPLATE_FILES):; $(OPTIONS_GEN_CPP) $(OPTIONS_GEN_H) options_holder.h $(DOCUMENTATION_FILES): options.cpp options.cpp: mkoptions.py $(CPP_TEMPLATE_FILES) $(OPTIONS_CONFIG_FILES) $(DOCUMENTATION_TEMPLATE_FILES) - @srcdir@/mkoptions.py @abs_srcdir@ ../../doc . $(addprefix @abs_srcdir@/, $(OPTIONS_CONFIG_FILES)) + $(PYTHON) @srcdir@/mkoptions.py @abs_srcdir@ ../../doc . $(addprefix @abs_srcdir@/, $(OPTIONS_CONFIG_FILES)) # This rule is ugly. It's needed to ensure that automake's dependence # includes are available during distclean, even though they come from