westurner / dotfiles

Bash, Python, IPython scripts, and userspace configuration https://westurner.org/dotfiles/

Home Page:https://westurner.org/dotfiles/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: ipython_config.py (venv, scripts/venv.py): _APP support is broken

westurner opened this issue · comments

How this should (did) work:

# env vars

__WRK="${HOME}/-wrk"
#WORKON_HOME="~/.virtualenvs"
WORKON_HOME="$__WRK/-ve27"  ## ~/-wrk/-ve27

VENVSTR=${1:-${VENVSTR}}
VENVSTR="dotfiles"  ## we dotfiles
VENVSTRAPP=${2:-${VENVSTRAPP:-${VENVSTR}}}

VIRTUAL_ENV_PREFIX="$VENVSTR"
VIRTUAL_ENV="$WORKON_HOME/$VIRTUAL_ENV_PREFIX"
_VENVPREFIX=$VIRTUAL_ENV
_SRC="$_VENVPREFIX/src"
_WRD="$_SRC/$_APP" 

## Create the __DOTFILES symlink to the current dotfiles repo:
__DOTFILES=~/-dotfiles
ln -s $_WRD $__DOTFILES

## Link to the venv script (also scripts/venv.py, etc/ipython/ipython_config.py)
__VENV="${__DOTFILES}/src/dotfiles/venv/ipython_config.py"

## Workon a venv (in `$WORKON_HOME` (or abspath($1)))
# we() {   ## bash function (we command)
#     source <($__VENV --print-bash $VENVSTR $VENVSTRAPP)
# }
## we dotfiles == we dotfiles dotfiles
we ${1:-${VENVSTR}} ${2:-${VENVSTRAPP:-${VENVSTR}}}
set -x;
[ "$_WRD" == "$WORKON_HOME/$VENVSTR/src/$VENVSTRAPP" ] || return 1

# dotfiles_status  # ds
  • tests
    • unittest.TestCases
    • ] [ shell test cases
  • venv "${1:-${VENVSTR}}" "${2:-${VENVSTRAPP:-${VENVSTR}}}"

This appears to be fixed in 0.7.1