10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

Remove install ocaml from ninja

This commit is contained in:
Thomas Applencourt 2015-06-08 17:23:59 +02:00
parent d2c110c472
commit 92fb69500c
3 changed files with 33 additions and 15 deletions

View File

@ -10,7 +10,7 @@ before_script:
- sudo apt-get install graphviz - sudo apt-get install graphviz
script: script:
- travis_wait ./setup_environment.py - ./setup_environment.py
- source ./quantum_package.rc - source ./quantum_package.rc
- qp_create_ninja.py --production ./config/gfortran_example.cfg - qp_create_ninja.py --production ./config/gfortran_example.cfg
- ninja - ninja

View File

@ -17,24 +17,17 @@ cd -
cd Downloads || exit 1 cd Downloads || exit 1
chmod +x ocaml.sh || exit 1 chmod +x ocaml.sh || exit 1
if [[ -d ${HOME}/.opam ]]
then
source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
fi
echo N | ./ocaml.sh ${QP_ROOT}/bin/ || exit 1 echo N | ./ocaml.sh ${QP_ROOT}/bin/ || exit 1
if [[ ! -f ${QP_ROOT}/bin/opam ]]
then ${QP_ROOT}/bin/opam config setup -a|| exit 1
echo "Installation of OPAM failed"
exit 2
fi
${QP_ROOT}/bin/opam config setup -a --dot-profile ${QP_ROOT}/quantum_package.rc || exit 1
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}
export C_INCLUDE_PATH=${QP_ROOT}/lib:${C_INCLUDE_PATH} export C_INCLUDE_PATH=${QP_ROOT}/lib:${C_INCLUDE_PATH}
source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
source ${QP_ROOT}/quantum_package.rc ${QP_ROOT}/bin/opam install ${PACKAGES} -y -q || exit 1
echo Y | ${QP_ROOT}/bin/opam install ${PACKAGES} || exit 1
rm -f ../_build/ocaml.log rm -f ../_build/ocaml.log
exit 0 exit 0

View File

@ -201,6 +201,7 @@ for need in l_need:
l_need_genealogy = d_need_genealogy.keys() l_need_genealogy = d_need_genealogy.keys()
l_need_genealogy = ["ocaml"]
print """ print """
__ __
(_ ._ _ ._ _ _. ._ (_ ._ _ ._ _ _. ._
@ -269,6 +270,9 @@ l_build = []
for need in l_need_genealogy: for need in l_need_genealogy:
if need == "ocaml":
continue
url = d_info[need].url url = d_info[need].url
extension = splitext(url)[1] extension = splitext(url)[1]
@ -306,6 +310,27 @@ print """
""" """
subprocess.check_call("./bin/ninja -C install", shell=True) subprocess.check_call("./bin/ninja -C install", shell=True)
print "Done"
if "ocaml" in l_need_genealogy:
print """
# ~#~#~#~#~#~#~#~#~#~#~#~#~ #
# I n s t a l l _ o c a m l #
# ~#~#~#~#~#~#~#~#~#~#~#~#~ #
"""
url = d_info["ocaml"].url
extension = splitext(url)[1]
path_archive = "Downloads/{0}{1}".format("ocaml", extension)
l_cmd = ["cd install &&",
"wget {0} -O {1} -o /dev/null &&".format(url, path_archive),
"./scripts/install_ocaml.sh"]
os.system(" ".join(l_cmd))
print "Done"
l_need_genealogy.remove("ocaml")
print """ print """