From b49423c94386eeeef60939ad108e560df6a69ef3 Mon Sep 17 00:00:00 2001 From: "Jovany Leandro G.C bit4bit@riseup.net" Date: Tue, 1 Aug 2023 18:06:14 -0500 Subject: [PATCH] chore: se extra instalacion de modulo a script --- .dev/install_module.sh | 22 ++++++++++++++++++++++ .dev/run.sh | 14 +------------- 2 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 .dev/install_module.sh diff --git a/.dev/install_module.sh b/.dev/install_module.sh new file mode 100644 index 0000000..f21612f --- /dev/null +++ b/.dev/install_module.sh @@ -0,0 +1,22 @@ +# este script fuerza que los cambios se vean reflejados +# directamente en trytond. +# +# variables exportadas: +# - module_name + +[ ! -d "$SRC" ] && die "no se ubica ruta en SRC" + +# dependencias minimas +pip3 install psycopg2 proteus inotify honcho + +# instalar dependencias de tryton desde paquete +python3 setup.py install + +# usamos enlace al paquete +python3 setup.py develop + +# instalar modulo +trytond_modules_path=`pip3 show trytond | grep Location | sed -nr 's/Location: +//gp'`/trytond/modules +module_name=`cat "$SRC/setup.py" | fgrep -A 1 [trytond.modules] | sed 1d | cut -d '=' -f 1 | tr -d ' \n'` +[ ! -d "$trytond_modules_path" ] && die "fallo al ubicar ruta de modulos de trytond" +ln -sf "$SRC" "$trytond_modules_path/$module_name" diff --git a/.dev/run.sh b/.dev/run.sh index 640ae10..ca677e0 100755 --- a/.dev/run.sh +++ b/.dev/run.sh @@ -14,20 +14,8 @@ die() { set -e -# dependencias minimas -pip3 install psycopg2 proteus inotify honcho - -# instalar dependencias de tryton desde paquete -python3 setup.py install - -# usamos enlace al paquete -python3 setup.py develop - # instalar modulo -trytond_modules_path=`pip3 show trytond | grep Location | sed -nr 's/Location: +//gp'`/trytond/modules -module_name=`cat "$SRC/setup.py" | fgrep -A 1 [trytond.modules] | sed 1d | cut -d '=' -f 1 | tr -d ' \n'` -[ ! -d "$trytond_modules_path" ] && die "fallo al ubicar ruta de modulos de trytond" -ln -sf "$SRC" "$trytond_modules_path/$module_name" +source ${SCRIPT_DIR}/install_module.sh # inicializar base de datos # https://docs.tryton.org/projects/server/en/latest/tutorial/module/setup_database.html