#! /usr/bin/env bash

hash -d python3 ipython3

pip_upgrade () {
    python3 -m pip install --index-url=https://pypi.wwts.com --upgrade --no-deps "$@" | grep -v -e already -e Looking -e [uU]ninstall -e [cC]ached -e [cC]ollecting -e build
}

main () {
    local clone_=~/bots/iterm
    cd $clone_
    echo "cd $clone_"
    echo Updating git
    git checkout -q __main__ 
    git pull -q --rebase | grep -v Already
    source .venv/bin/activate
    echo Upgrading pip packages
    pip_upgrade pip pysyte
    pip_upgrade -r requirements/development.txt
    export PYTHONHTTPSVERIFY=0
    export TERM=xterm-256color
    PATH=$clone_/.venv/bin:/usr/local/gnu:/usr/local/bin:/Users/jab/bin:/Users/jab/jab/bin:/Users/jab/.local:/bin:/usr/bin \
      PYTHONPATH=. \
      .venv/bin/ipython3 \
        --profile=bots \
        --no-confirm-exit
}

main

#! /usr/bin/env bash

hash -d python3 ipython3

pip_upgrade () {
    python3 -m pip install --extra-index-url=https://pypi.wwts.com --upgrade --no-deps "$@" | grep -v -e already -e Looking -e [uU]ninstall -e [cC]ached -e [cC]ollecting -e build
}

main () {
    local clone_=~/bots/iterm
    cd $clone_
    echo "cd $clone_"
    echo Updating git
    git checkout -q __main__ 
    git pull -q --rebase | grep -v Already
    source .venv/bin/activate
    echo Upgrading pip packages
    pip_upgrade pip pysyte
    pip_upgrade -r requirements/development.txt
    export PYTHONHTTPSVERIFY=0
    export TERM=xterm-256color
    PATH=$clone_/.venv/bin:/usr/local/gnu:/usr/local/bin:/Users/jab/bin:/Users/jab/jab/bin:/Users/jab/.local:/bin:/usr/bin \
      PYTHONPATH=. \
      .venv/bin/ipython3 \
        --profile=bots \
        --no-confirm-exit
}

main

Use pypi as primary source for pip
Use pypi as primary source for pip

Avoid problems when VPN is down
