From c85a28860506bee83e7086cf382a054eb4103eb9 Mon Sep 17 00:00:00 2001 From: Thomas Applencourt Date: Tue, 23 Jun 2015 16:01:44 +0200 Subject: [PATCH] Working --- configure | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 6ff1c77b..79460134 100755 --- a/configure +++ b/configure @@ -158,7 +158,7 @@ def check_output(*popenargs, **kwargs): >>> check_output(['/usr/bin/python', '--version']) Python 2.6.2 """ - process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) + process = subprocess.Popen(stdout=subprocess.PIPE,stderr=subprocess.PIPE, *popenargs, **kwargs) output, unused_err = process.communicate() retcode = process.poll() if retcode: @@ -190,7 +190,7 @@ def checking(d_dependency): def check_availability(binary): """ - If avalabie return the path who can can't find the + If avalable return the path who can find the binary else return 0 """ @@ -201,10 +201,11 @@ def checking(d_dependency): a = check_output(["which", binary]) if binary == "irpf90": - cmd = join(QP_ROOT_INSTALL, "scripts", "check_irp_version.sh") - - if check_output(cmd) == "FAIL": - raise subprocess.CalledProcessError + version = check_output("irpf90 -v".split()) + + from distutils.version import LooseVersion + if LooseVersion(version) < LooseVersion("1.6.7"): + return 0 else: return a @@ -219,7 +220,7 @@ def checking(d_dependency): def get_list_descendant(d_dependency, l_installed, l_needed): """ - Descendant – a node reachable by repeated proceeding from parent to child. + Descendant : a node reachable by repeated proceeding from parent to child. """ d_need_genealogy = dict() @@ -434,8 +435,8 @@ def create_ninja_and_rc(l_installed): 'export IRPF90={0}'.format(find_path("irpf90", l_installed)), 'export NINJA={0}'.format(find_path("ninja", l_installed)), 'export QP_PYTHON={0}'.format(":".join(l_python)), "", - 'export PYTHONPATH="${PYTHONPATH}":"${QP_PYTHON}"', - 'export PATH="${PATH}":"${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml', + 'export PYTHONPATH="${QP_PYTHON}":"${PYTHONPATH}"', + 'export PATH="${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml:"${PATH}"', 'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}"', 'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', "" 'source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true',