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

Rename only_children... into module_handler.py

This commit is contained in:
Thomas Applencourt 2015-05-04 15:03:53 +02:00
parent 0199fc1374
commit fdc415b4a2
5 changed files with 21 additions and 14 deletions

View File

@ -25,7 +25,8 @@ fi
if [[ $1 == "-" ]] if [[ $1 == "-" ]]
then then
COMMAND_LINE=$(only_children_to_all_genealogy.py NEEDED_MODULES)
COMMAND_LINE=$(module_handler.py print_genealogy NEEDED_MODULES)
else else
COMMAND_LINE=$(unique_list $@) COMMAND_LINE=$(unique_list $@)
fi fi
@ -44,7 +45,7 @@ DEPS_LONG=""
for i in $COMMAND_LINE for i in $COMMAND_LINE
do do
DEPS_LONG+=" $i " 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 done
DEPS=$(unique_list $DEPS_LONG) DEPS=$(unique_list $DEPS_LONG)

View File

@ -13,7 +13,8 @@ source ${QPACKAGE_ROOT}/scripts/qp_include.sh
function do_clean() function do_clean()
{ {
rm -rf -- \ 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 ezfio_interface.irp.f irpf90.make irpf90_entities tags $(ls_exe) *.mod
} }

View File

@ -2,16 +2,19 @@
# -*- coding: utf-8 -*- # -*- 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 of a NEEDED_CHILDREN_MODULES file
Usage: Usage:
only_children_to_all_genealogy.py [<NEEDED_CHILDREN_MODULES>] module_handler.py print_genealogy [<NEEDED_CHILDREN_MODULES>]
[--create_png] module_handler.py create_png [<NEEDED_CHILDREN_MODULES>]
Help: Options:
If NEEDED_CHILDREN_MODULES is not set, check the current pwd print_genealogy Print the genealogy of the NEEDED_CHILDREN_MODULES
Same for create_png. aka (children, subchildren, etc)
if NEEDED_CHILDREN_MODULES
try to open it in the current path
""" """
from docopt import docopt from docopt import docopt
@ -180,8 +183,9 @@ if __name__ == '__main__':
path = os.path.expanduser(path) path = os.path.expanduser(path)
path = os.path.expandvars(path) path = os.path.expandvars(path)
l_all_needed_molule = module_genealogy(path) if arguments['print_genealogy']:
print " ".join(sorted(l_all_needed_molule)) 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) create_png_from_path(path)

View File

@ -35,9 +35,10 @@ function check_current_dir_is_module()
exit -1 exit -1
fi fi
} }
if [[ -f NEEDED_CHILDREN_MODULES ]] if [[ -f NEEDED_CHILDREN_MODULES ]]
then then
NEEDED_MODULES=$(only_children_to_all_genealogy.py) NEEDED_MODULES=$(module_handler.py print_genealogy NEEDED_CHILDREN_MODULES)
fi fi
# List of executables in the current directory # List of executables in the current directory

View File

@ -19,7 +19,7 @@ default: all .gitignore
include $(QPACKAGE_ROOT)/src/Makefile.config include $(QPACKAGE_ROOT)/src/Makefile.config
# Create the NEEDED_CHILDREN_MODULES variable, needed for IRPF90 # 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 # Check and update dependencies
include Makefile.depend include Makefile.depend