10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00
This commit is contained in:
Thomas Applencourt 2015-06-23 16:01:44 +02:00
parent 6d4c22a2b0
commit c85a288605

17
configure vendored
View File

@ -158,7 +158,7 @@ def check_output(*popenargs, **kwargs):
>>> check_output(['/usr/bin/python', '--version']) >>> check_output(['/usr/bin/python', '--version'])
Python 2.6.2 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() output, unused_err = process.communicate()
retcode = process.poll() retcode = process.poll()
if retcode: if retcode:
@ -190,7 +190,7 @@ def checking(d_dependency):
def check_availability(binary): 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 binary else return 0
""" """
@ -201,10 +201,11 @@ def checking(d_dependency):
a = check_output(["which", binary]) a = check_output(["which", binary])
if binary == "irpf90": if binary == "irpf90":
cmd = join(QP_ROOT_INSTALL, "scripts", "check_irp_version.sh") version = check_output("irpf90 -v".split())
if check_output(cmd) == "FAIL": from distutils.version import LooseVersion
raise subprocess.CalledProcessError if LooseVersion(version) < LooseVersion("1.6.7"):
return 0
else: else:
return a return a
@ -219,7 +220,7 @@ def checking(d_dependency):
def get_list_descendant(d_dependency, l_installed, l_needed): 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() 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 IRPF90={0}'.format(find_path("irpf90", l_installed)),
'export NINJA={0}'.format(find_path("ninja", l_installed)), 'export NINJA={0}'.format(find_path("ninja", l_installed)),
'export QP_PYTHON={0}'.format(":".join(l_python)), "", 'export QP_PYTHON={0}'.format(":".join(l_python)), "",
'export PYTHONPATH="${PYTHONPATH}":"${QP_PYTHON}"', 'export PYTHONPATH="${QP_PYTHON}":"${PYTHONPATH}"',
'export PATH="${PATH}":"${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml', 'export PATH="${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml:"${PATH}"',
'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}"', 'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}"',
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', "" 'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', ""
'source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true', 'source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true',