diff --git a/all/lang/go b/all/lang/go index 60e8ad8..5618995 100644 --- a/all/lang/go +++ b/all/lang/go @@ -2,7 +2,7 @@ # --- Go Language Environment BEGIN --- export GOROOT=/opt/go - export PATH=$PATH:/opt/go/bin - export GOPATH=/opt/go/apps - export PATH=$PATH:/opt/go/apps/bin +export PATH=$PATH:/opt/go/bin +export GOPATH=/opt/go/apps +export PATH=$PATH:/opt/go/apps/bin # --- Go Language Environment END --- diff --git a/all/lang/node b/all/lang/node index 5e83e0e..dec79ba 100644 --- a/all/lang/node +++ b/all/lang/node @@ -44,7 +44,7 @@ alias npma="npm-add-dependencies" # alias npmpub="npm publish --access public" alias npmlrepub="npm publish --registry http://localhost:4873 --force --access restricted" alias npmlpub="npm publish --registry http://localhost:4873 --access restricted" -alias npmkrepub="npm version patch && npm publish --registry https://npm.kebler.net --access restricted" +alias npmkrepub="npm publish --registry https://npm.kebler.net --force --access restricted" alias npmkpub="npm publish --registry https://npm.kebler.net --access restricted" alias npmpatch="npm version patch" alias npmmajor="npm version major" diff --git a/all/lang/python b/all/lang/python index 51e4110..4b06a36 100644 --- a/all/lang/python +++ b/all/lang/python @@ -1,4 +1,14 @@ #!/bin/bash + +use_pyenv () { + if command -v pyenv >/dev/null 2>&1; then + export PYENV_ROOT="/opt/python/pyenv" + export PYENV_VERSION=${PYENV_VERSION:-3.8.7} + eval "$(pyenv init -)" + eval "$(pyenv virtualenv-init -)" + fi +} + # TODO make alias generating function for versions of python alias python3x="sudo -H python3.8 -m" alias spip="sudo -H python3.8 -m pip" @@ -14,24 +24,15 @@ alias pipi="pipx install" alias pipl="pipx list" alias piplv="pipx list --verbose" -if command -v pyenv >/dev/null 2>&1; then - -# pyenv environment path_append "/opt/python/bin" -# eval "$(pyenv init -)" -# eval "$(pyenv virtualenv-init -)" - -export PYENV_ROOT="/opt/python/pyenv" -export PYENV_VERSION=3.8.7 -eval "$(pyenv init -)" -eval "$(pyenv virtualenv-init -)" - -fi - +if command -v pipx >/dev/null 2>&1; then path_append "/opt/python/apps/bin" export PIPX_HOME=/opt/python/apps export PIPX_BIN_DIR=$PIPX_HOME/bin +fi + +[[ $USE_PYENV ]] && use_pyenv spipua () { module_load confirm @@ -44,3 +45,4 @@ echo "$List" confirm "ATTENTION: upgrade all these packages at once??" || return 0 echo "$List" | cut -d' ' -f1 | xargs -n1 sudo -H python$Ver -m pip install -U } +