mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 10:05:57 +01:00
Rename only_children... into module_handler.py
This commit is contained in:
parent
0199fc1374
commit
fdc415b4a2
@ -25,7 +25,8 @@ fi
|
||||
|
||||
if [[ $1 == "-" ]]
|
||||
then
|
||||
COMMAND_LINE=$(only_children_to_all_genealogy.py NEEDED_MODULES)
|
||||
|
||||
COMMAND_LINE=$(module_handler.py print_genealogy NEEDED_MODULES)
|
||||
else
|
||||
COMMAND_LINE=$(unique_list $@)
|
||||
fi
|
||||
@ -44,7 +45,7 @@ DEPS_LONG=""
|
||||
for i in $COMMAND_LINE
|
||||
do
|
||||
DEPS_LONG+=" $i "
|
||||
DEPS_LONG+=$(only_children_to_all_genealogy.py "${QPACKAGE_ROOT}/src/${i}/NEEDED_MODULES")
|
||||
DEPS_LONG+=$(module_handler.py print_genealogy "${QPACKAGE_ROOT}/src/${i}/NEEDED_MODULES")
|
||||
done
|
||||
|
||||
DEPS=$(unique_list $DEPS_LONG)
|
||||
|
@ -13,7 +13,8 @@ source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
||||
function do_clean()
|
||||
{
|
||||
rm -rf -- \
|
||||
IRPF90_temp IRPF90_man Makefile.depend $(only_children_to_all_genealogy.py) include \
|
||||
IRPF90_temp IRPF90_man Makefile.depend \
|
||||
$(module_handler.py print_genealogy) include \
|
||||
ezfio_interface.irp.f irpf90.make irpf90_entities tags $(ls_exe) *.mod
|
||||
}
|
||||
|
||||
|
@ -2,16 +2,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Create the NEEDED_MODULE aka the genealogy (children module, subchildren module and so on),
|
||||
Create the NEEDED_MODULE
|
||||
aka the genealogy (children module, subchildren module and so on),
|
||||
of a NEEDED_CHILDREN_MODULES file
|
||||
|
||||
Usage:
|
||||
only_children_to_all_genealogy.py [<NEEDED_CHILDREN_MODULES>]
|
||||
[--create_png]
|
||||
module_handler.py print_genealogy [<NEEDED_CHILDREN_MODULES>]
|
||||
module_handler.py create_png [<NEEDED_CHILDREN_MODULES>]
|
||||
|
||||
Help:
|
||||
If NEEDED_CHILDREN_MODULES is not set, check the current pwd
|
||||
Same for create_png.
|
||||
Options:
|
||||
print_genealogy Print the genealogy of the NEEDED_CHILDREN_MODULES
|
||||
aka (children, subchildren, etc)
|
||||
if NEEDED_CHILDREN_MODULES
|
||||
try to open it in the current path
|
||||
"""
|
||||
|
||||
from docopt import docopt
|
||||
@ -180,8 +183,9 @@ if __name__ == '__main__':
|
||||
path = os.path.expanduser(path)
|
||||
path = os.path.expandvars(path)
|
||||
|
||||
if arguments['print_genealogy']:
|
||||
l_all_needed_molule = module_genealogy(path)
|
||||
print " ".join(sorted(l_all_needed_molule))
|
||||
|
||||
if arguments["--create_png"]:
|
||||
if arguments["create_png"]:
|
||||
create_png_from_path(path)
|
@ -35,9 +35,10 @@ function check_current_dir_is_module()
|
||||
exit -1
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ -f NEEDED_CHILDREN_MODULES ]]
|
||||
then
|
||||
NEEDED_MODULES=$(only_children_to_all_genealogy.py)
|
||||
NEEDED_MODULES=$(module_handler.py print_genealogy NEEDED_CHILDREN_MODULES)
|
||||
fi
|
||||
|
||||
# List of executables in the current directory
|
||||
|
@ -19,7 +19,7 @@ default: all .gitignore
|
||||
include $(QPACKAGE_ROOT)/src/Makefile.config
|
||||
|
||||
# Create the NEEDED_CHILDREN_MODULES variable, needed for IRPF90
|
||||
NEEDED_CHILDREN_MODULES=$(shell only_children_to_all_genealogy.py)
|
||||
NEEDED_CHILDREN_MODULES=$(shell module_handler.py print_genealogy)
|
||||
|
||||
# Check and update dependencies
|
||||
include Makefile.depend
|
||||
|
Loading…
Reference in New Issue
Block a user