10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-07-03 01:45:59 +02:00

Beter error handler

This commit is contained in:
Thomas Applencourt 2015-07-16 12:15:07 +02:00
parent b9215aad50
commit aa2166bf1e
4 changed files with 12 additions and 21 deletions

View File

@ -669,25 +669,14 @@ def ninja_binaries_build(path_module, l_children, d_binaries):
" module_abs = {0}".format(path_module.abs),
" module_rel = {0}".format(path_module.rel), ""]
l_string += ["build module_{0}: phony {1}".format(path_module.rel,
" ".join(l_abs_bin)), ""]
l_string += ["build module_{0}: phony {1} {2}".format(path_module.rel,
" ".join(l_abs_bin),
os.path.join(path_module.abs,"README.rst")),
""]
return l_string
#
# |\/| _ _| | _
# | | (_) (_| |_| | (/_
#
def create_module_ninja():
"""
In a module create a build.ninja
"""
l_string = ["rule all:"]
return l_string
# ___
# | ._ _ _ _| _ ._ _ ._ _| _ ._ _ o _ _
# | | (/_ (/_ (_| (/_ |_) (/_ | | (_| (/_ | | (_ | (/_ _>

View File

@ -82,9 +82,10 @@ def get_l_module_descendant(d_child, l_module):
try:
l.extend(get_l_module_descendant(d_child, d_child[module]))
except KeyError:
print >> sys.stderr, "`{0}` not submodule".format(module)
print >> sys.stderr, "Check the corresponding NEEDED_CHILDREN_MODULES"
raise
print >> sys.stderr, "Error: "
print >> sys.stderr, "`{0}` is not a submodule".format(module)
print >> sys.stderr, "Check the typo (orthograph, case, '/', etc.) "
sys.exit(1)
return list(set(l))

View File

@ -25,7 +25,7 @@ try:
from update_README import Doc_key, Needed_key
from qp_path import QP_SRC, QP_PLUGINS
except ImportError:
print "Please check if you have source the .quantum_package.rc"
print "Please check if you have sourced the .quantum_package.rc"
print "(`source .quantum_package.rc`)"
print sys.exit(1)
@ -160,7 +160,6 @@ if __name__ == '__main__':
print "Your src directory is broken. Please remove %s" % des
raise
try:
import subprocess
subprocess.check_call(["qp_create_ninja.py", "update"])
except:
raise

4
src/.gitignore vendored
View File

@ -23,4 +23,6 @@ QmcChem
Selectors_full
Selectors_no_sorted
SingleRefMethod
Casino
Casino
loc_cele
Alavi