mirror of
https://github.com/LCPQ/quantum_package
synced 2024-10-19 22:41:48 +02:00
Fix a few things (#76)
* Check if EZFIO is installed when sourcing qp.rc. Maybe need to be done elsewhere * Better message for f77zmq * Add better error message for Opam (tell people to install ocaml) * Better message for Opam location * Ezfio.sh is not an executable * Fix qp_modul install with the new pluging hierachy * Port back the LIB fixe * Add bats install script for test (How travis was working?) * Update travis * Fix important output problem * Update configure * Update quantum_package.rc.default
This commit is contained in:
parent
04f1389cb1
commit
0cfef83090
@ -35,5 +35,6 @@ python:
|
||||
|
||||
script:
|
||||
- ./configure --install all --config ./config/travis.cfg
|
||||
- ./configure --install bats
|
||||
- source ./quantum_package.rc ; ninja -j 1 -v
|
||||
- source ./quantum_package.rc ; cd tests ; ./run_tests.sh -v
|
||||
|
26
configure
vendored
26
configure
vendored
@ -131,7 +131,7 @@ if [[ "${PACKAGES}.x" != ".x" ]] ; then
|
||||
fi
|
||||
|
||||
if [[ ${PACKAGES} = all ]] ; then
|
||||
PACKAGES="ninja irpf90 zeromq f77zmq ocaml ezfio emsl docopt resultsFile"
|
||||
PACKAGES="ninja irpf90 zeromq f77zmq ocaml ezfio emsl docopt resultsFile bats"
|
||||
fi
|
||||
|
||||
|
||||
@ -220,7 +220,7 @@ EOF
|
||||
else
|
||||
# Conventional commands
|
||||
export OPAMROOT=${OPAMROOT:-${QP_ROOT}/external/opam}
|
||||
echo ${QP_ROOT}/bin
|
||||
echo "QP>> Please install it here: " ${QP_ROOT}/bin
|
||||
${QP_ROOT}/external/opam_installer.sh
|
||||
fi
|
||||
rm ${QP_ROOT}/external/opam_installer.sh
|
||||
@ -276,7 +276,16 @@ EOF
|
||||
rm -rf resultsFile-master resultsFile.tar.gz
|
||||
cd "${QP_ROOT}"
|
||||
|
||||
elif [[ ${PACKAGE} = bats ]] ; then
|
||||
cd "${QP_ROOT}"/external
|
||||
git clone https://github.com/bats-core/bats-core.git
|
||||
cd bats-core
|
||||
./install.sh .
|
||||
ln -s ./bin/bats "${QP_ROOT}"/bin/bats
|
||||
cd "${QP_ROOT}"
|
||||
fi
|
||||
|
||||
|
||||
done
|
||||
|
||||
|
||||
@ -300,13 +309,13 @@ fi
|
||||
|
||||
F77ZMQ=$(find_lib -lzmq -lf77zmq)
|
||||
if [[ ${F77ZMQ} = not_found ]] ; then
|
||||
echo "Fortran binding of ZeroMQ is not installed."
|
||||
echo "Fortran binding of ZeroMQ (f77zmq) is not installed."
|
||||
fail
|
||||
fi
|
||||
|
||||
OPAM=$(find_exe opam)
|
||||
if [[ ${OPAM} = not_found ]] ; then
|
||||
echo "OPAM package manager is not installed."
|
||||
echo "OPAM (ocaml) package manager is not installed."
|
||||
fail
|
||||
fi
|
||||
|
||||
@ -340,7 +349,14 @@ if [[ ${RESULTSFILE} = not_found ]] ; then
|
||||
fail
|
||||
fi
|
||||
|
||||
echo "All dependencies installed."
|
||||
echo " ___________________________ "
|
||||
echo "< All dependencies installed. >"
|
||||
echo " --------------------------- "
|
||||
echo " \ ^__^ "
|
||||
echo " \ (oo)\_______ "
|
||||
echo " (__)\ )\/\. "
|
||||
echo " ||----w | "
|
||||
echo " || || "
|
||||
|
||||
|
||||
|
||||
|
@ -26,7 +26,11 @@ export LIBRARY_PATH=$(qp_prepend_export "LIBRARY_PATH" "${QP_ROOT}"/lib:"${QP_RO
|
||||
export C_INCLUDE_PATH=$(qp_prepend_export "C_INCLUDE_PATH" "${QP_ROOT}"/include)
|
||||
|
||||
if [[ $SHELL == "/bin/bash" ]] ; then
|
||||
source ${QP_EZFIO}/Bash/ezfio.sh
|
||||
if [[ -f ${QP_EZFIO}/Bash/ezfio.sh ]]; then
|
||||
source ${QP_EZFIO}/Bash/ezfio.sh
|
||||
else
|
||||
echo "EZFIO is not installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
#### END Don't modify
|
||||
|
@ -97,7 +97,9 @@ def ninja_create_env_variable(pwd_config_file):
|
||||
l_string.append(str_)
|
||||
|
||||
lib_lapack = get_compilation_option(pwd_config_file, "LAPACK_LIB")
|
||||
str_lib = " ".join([LIB, lib_lapack, EZFIO_LIB, ZMQ_LIB])
|
||||
lib_usr = get_compilation_option(pwd_config_file, "LIB")
|
||||
|
||||
str_lib = " ".join([LIB, lib_lapack, EZFIO_LIB, ZMQ_LIB, lib_usr])
|
||||
l_string.append("LIB = {0} ".format(str_lib))
|
||||
|
||||
l_string.append("")
|
||||
|
@ -7,6 +7,7 @@ Usage:
|
||||
qp_module install <name>...
|
||||
qp_module list (--installed | --available-local)
|
||||
qp_module uninstall <name>
|
||||
|
||||
Options:
|
||||
list: List all the modules available
|
||||
create: Create a new module
|
||||
@ -15,6 +16,9 @@ Options:
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
from os import listdir
|
||||
from os.path import isdir, join
|
||||
|
||||
|
||||
try:
|
||||
from docopt import docopt
|
||||
@ -66,12 +70,11 @@ def save_new_module(path, l_child):
|
||||
""")
|
||||
|
||||
def main(arguments):
|
||||
|
||||
if arguments in ["list_installed", "list_plugins"]:
|
||||
if arguments["list_installed"]:
|
||||
if arguments["list"]:
|
||||
if arguments["--installed"]:
|
||||
l_repository = [QP_SRC]
|
||||
elif arguments["list_plugins"]:
|
||||
l_repository = [QP_PLUGINS]
|
||||
elif arguments["--available-local"]:
|
||||
l_repository = [join(QP_PLUGINS, f) for f in listdir(QP_PLUGINS) if isdir(join(QP_PLUGINS, f))]
|
||||
|
||||
m_instance = ModuleHandler(l_repository)
|
||||
|
||||
@ -112,7 +115,6 @@ def main(arguments):
|
||||
save_new_module(path, l_child_reduce)
|
||||
|
||||
print " [ OK ]"
|
||||
# print "` {0} install {1} `".format(os.path.basename(__file__), name)
|
||||
print ""
|
||||
arguments["create"]=False
|
||||
arguments["install"]=True
|
||||
@ -121,23 +123,15 @@ def main(arguments):
|
||||
elif arguments["download"]:
|
||||
print "Not yet implemented"
|
||||
pass
|
||||
# d_local = get_dict_child([QP_SRC])
|
||||
# d_remote = get_dict_child(arguments["<path_folder>"])
|
||||
#
|
||||
# d_child = d_local.copy()
|
||||
# d_child.update(d_remote)
|
||||
#
|
||||
# name = arguments["<name>"]
|
||||
# l_module_descendant = get_l_module_descendant(d_child, [name])
|
||||
#
|
||||
# for module in l_module_descendant:
|
||||
# if module not in d_local:
|
||||
# print "you need to install", module
|
||||
|
||||
elif arguments["install"]:
|
||||
|
||||
# Python 2.6 ...
|
||||
d_module_location= dict()
|
||||
|
||||
d_local = get_dict_child([QP_SRC])
|
||||
d_plugin = get_dict_child([QP_PLUGINS])
|
||||
d_plugin = get_dict_child([join(QP_PLUGINS, f) for f in listdir(QP_PLUGINS) if isdir(join(QP_PLUGINS, f))])
|
||||
|
||||
|
||||
d_child = d_local.copy()
|
||||
d_child.update(d_plugin)
|
||||
@ -164,7 +158,9 @@ def main(arguments):
|
||||
print "Installation...",
|
||||
|
||||
for module_to_cp in l_module_to_cp:
|
||||
src = os.path.join(QP_PLUGINS, module_to_cp)
|
||||
|
||||
# Find the module. This is ugly. Quick fix, we should refactor
|
||||
src = [ join(QP_PLUGINS, f, module_to_cp) for f in listdir(QP_PLUGINS) if isdir(join(QP_PLUGINS, f,module_to_cp) ) ][0]
|
||||
des = os.path.join(QP_SRC, module_to_cp)
|
||||
try:
|
||||
os.symlink(src, des)
|
||||
|
Loading…
Reference in New Issue
Block a user