From ac7251b722d306cd9c1179e1975674ddaded204f Mon Sep 17 00:00:00 2001 From: emdee Date: Fri, 19 Jan 2024 01:10:51 +0000 Subject: [PATCH] updates --- Makefile | 2 + ...entory.bash => ansible_get_inventory.bash} | 2 +- .../overlay/Linux/usr/local/src/ansible.bash | 2 +- .../overlay/Linux/usr/local/src/pyassuan.bash | 4 +- .../Linux/usr/local/src/stem_examples.bash | 42 +++++++++++++++++-- .../usr/local/src/usr_local_toxcore.bash | 2 + 6 files changed, 46 insertions(+), 8 deletions(-) rename roles/toxcore/overlay/Linux/usr/local/bin/{testforge_get_inventory.bash => ansible_get_inventory.bash} (99%) mode change 100644 => 100755 roles/toxcore/overlay/Linux/usr/local/src/pyassuan.bash diff --git a/Makefile b/Makefile index 77ddd40..8da448e 100644 --- a/Makefile +++ b/Makefile @@ -244,6 +244,8 @@ test_vm:: install_vm --verbose ${VERBOSE} -t daily \ $(ROLES) > .$@-${LOCALHOST} 2>&1 # ${VERBOSE} +rsync:: + bash .rsync.sh veryclean:: clean rm -f .run* .check* diff --git a/roles/toxcore/overlay/Linux/usr/local/bin/testforge_get_inventory.bash b/roles/toxcore/overlay/Linux/usr/local/bin/ansible_get_inventory.bash similarity index 99% rename from roles/toxcore/overlay/Linux/usr/local/bin/testforge_get_inventory.bash rename to roles/toxcore/overlay/Linux/usr/local/bin/ansible_get_inventory.bash index 3efa48f..681e24d 100755 --- a/roles/toxcore/overlay/Linux/usr/local/bin/testforge_get_inventory.bash +++ b/roles/toxcore/overlay/Linux/usr/local/bin/ansible_get_inventory.bash @@ -6,7 +6,7 @@ prog=`basename $0 .bash` PREFIX=/usr/local -ROLE=base +ROLE=toxcore AnsI=AnsI # quiet diff --git a/roles/toxcore/overlay/Linux/usr/local/src/ansible.bash b/roles/toxcore/overlay/Linux/usr/local/src/ansible.bash index 9babc02..5139d66 100755 --- a/roles/toxcore/overlay/Linux/usr/local/src/ansible.bash +++ b/roles/toxcore/overlay/Linux/usr/local/src/ansible.bash @@ -49,7 +49,7 @@ if [ "$#" -eq 0 ] ; then bash /usr/local/sbin/base_patch_from_diff.bash $ROLE \ $TODIR/roles/$ROLE/overlay/Linux/$PREFIX/patches/$ROLE/$PWD || exit 6$? - [ -d $PREFIX/$LIB/python$PYTHON_MINOR/site-packages/$DIR-py$PYTHON_MINOR.egg ] || \ + [ -d $PREFIX/$LIB/python$PYTHON_MINOR/site-packages/$DIR.dist-info ] || \ pip3.sh install . >> install.log 2>&1\ || { echo "ERROR: code $?" ; tail install.log ; exit 5 ; } diff --git a/roles/toxcore/overlay/Linux/usr/local/src/pyassuan.bash b/roles/toxcore/overlay/Linux/usr/local/src/pyassuan.bash old mode 100644 new mode 100755 index df337e9..aab6acd --- a/roles/toxcore/overlay/Linux/usr/local/src/pyassuan.bash +++ b/roles/toxcore/overlay/Linux/usr/local/src/pyassuan.bash @@ -47,8 +47,8 @@ if [ "$#" -eq 0 ] ; then #? [ -e /var/local/src/var_local_local.bash ] && . /var/local/src/var_local_local.bash - [ -d $PREFIX/$LIB/python${PYTHON_MINOR}/site-packages/${DIR}-${VER}-py${PYTHON_MINOR}.egg ] || \ - msys_python_setup_install 2>&1 || { ERROR "code $?" ; cat install$PYVER.log ; exit 6 ; } + [ -d $PREFIX/$LIB/python${PYTHON_MINOR}/site-packages/${DIR}-${VER}.dist-info ] || \ + msys_python_pip_install . 2>&1 || { ERROR "code $?" ; cat install$PYVER.log ; exit 6 ; } # msys_python_bins $BINS diff --git a/roles/toxcore/overlay/Linux/usr/local/src/stem_examples.bash b/roles/toxcore/overlay/Linux/usr/local/src/stem_examples.bash index 49e9cd2..ee0388e 100644 --- a/roles/toxcore/overlay/Linux/usr/local/src/stem_examples.bash +++ b/roles/toxcore/overlay/Linux/usr/local/src/stem_examples.bash @@ -10,15 +10,19 @@ P="BASE_PYTHON${PYVER}_MINOR" PYTHON_MINOR="$(eval echo \$$P)" PYTHON_EXE_MSYS=$PREFIX/bin/python$PYVER.bash PYTHON_EXE=$PYTHON_EXE_MSYS +LOCAL_DOCTEST=/usr/local/bin/testforge_run_doctest3.bash +DOCTEST=${LOCAL_DOCTEST} . /usr/local/src/usr_local_src.bash || exit 2 PKG=stem_examples DIR=$PKG +MOD=$DIR +GIT_HUB=git.macaw.me +GIT_USER=emdee +GIT_DIR=$DIR -#/var/local/bin/python3.bash setup.py install --prefix=/var/local - -ols_funtoo_requires dev-libs/stem +# ols_funtoo_requires dev-libs/stem # requires: py.test #? ols_pip${PYVER}_requires readme_renderer @@ -27,11 +31,41 @@ cd $PREFIX/src || exit 2 WD=$PWD if [ $# -eq 0 ] ; then - : + + if [ ! -d "$DIR" ] ; then + if [ ! -d "$PREFIX/net/Git/$GIT_HUB/$GIT_USER/$GIT_DIR" ] ; then + msys_are_we_connected || exit 0 + [ -d "$PREFIX/net/Git/$GIT_HUB/$GIT_USER" ] || \ + mkdir "$PREFIX/net/Git/$GIT_HUB/$GIT_USER" + ( cd "$PREFIX/net/Git/$GIT_HUB/$GIT_USER" && \ + git clone "https://$GIT_HUB/$GIT_USER/$GIT_DIR" ) ||\ + exit 2 + fi + cp -rip "$PREFIX/net/Git/$GIT_HUB/$GIT_USER/$GIT_DIR" . || exit 3 + fi + + python$PYVER.sh -c 'import stem' || \ + pip$PYVER.sh install stem + + [ -d $PREFIX/$LIB/python${PYTHON_MINOR}/site-packages/${DIR}-${VER}.dist-info ] || \ + msys_python_pip_install . > install$PYVER.log 2>&1 || { + ERROR "pip retval=$?" ; + cat install$PYVER.log ; + exit 6 ; + } + + # msys_python_bins $BINS + +elif [ "$1" = 'check' ] ; then # 1* + "$PYTHON_EXE_MSYS" -c "import $MOD" 2>/dev/null || exit 10 + elif [ "$1" = 'lint' ] ; then # 2* cd $PREFIX/src/$DIR || exit 20 bash .pylint.sh 2>&1 || exit 2$? elif [ "$1" = 'test' ] ; then # 3* cd $PREFIX/src/$DIR || exit 30 + +elif [ "$1" = 'doctest' ] ; then # 8* + ${DOCTEST} $WD/$DIR/${DIR}.txt fi diff --git a/roles/toxcore/overlay/Linux/usr/local/src/usr_local_toxcore.bash b/roles/toxcore/overlay/Linux/usr/local/src/usr_local_toxcore.bash index 3360d17..4cf3f3c 100755 --- a/roles/toxcore/overlay/Linux/usr/local/src/usr_local_toxcore.bash +++ b/roles/toxcore/overlay/Linux/usr/local/src/usr_local_toxcore.bash @@ -20,6 +20,8 @@ if [ "$#" -eq 0 ] ; then bash c-toxcore.bash # || exit 13$? bash tox_profile.bash # || 14$? + bash stem_examples.bash # || 14$? + bash exclude_badExits.bash # sh mitogen.bash # sh toxcore_docker.bash || exit 14$? # which sdwdate >/dev/null 2>/dev/null || \