diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2021-07-06 01:13:01 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2021-07-06 01:13:01 +0200 |
| commit | 4f89b9c71f78a102b28c7538d0673148572814e6 (patch) | |
| tree | 1c46037bdd14980f21ca121c2134b22b63be7d85 /python/install.sh | |
| parent | 69ac4caeb4b369d1fce2bd5ad331abc5f0172e45 (diff) | |
.
Diffstat (limited to 'python/install.sh')
| -rwxr-xr-x | python/install.sh | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/python/install.sh b/python/install.sh deleted file mode 100755 index 1d7fa82..0000000 --- a/python/install.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -symlink () { - ln -sfT "$@" -} - -install_python() { - LONG=$1 - SHORT=${LONG//\./} - - PYTHON_BIN=$(command -v "python$LONG") - if [ ! -z $PYTHON_BIN ]; then - - PYTHON_DIR=~/python$SHORT - PIP_BIN=$PYTHON_DIR/bin/pip$LONG - REQUIREMENTS=~/.dotfiles/python/requirements.pip$SHORT.txt - LOCAL_PYTHON_BIN=~/bin/python$LONG - LOCAL_PIP_BIN=~/bin/pip$LONG - LOCAL_DOIT_BIN=~/bin/doit$LONG - - [ ! -d $PYTHON_DIR ] && \ - $PYTHON_BIN -m venv --system-site-packages $PYTHON_DIR - - $PIP_BIN -q install -U -r $REQUIREMENTS - - echo "#!/bin/sh" > $LOCAL_PYTHON_BIN - echo "exec $(cd $PYTHON_DIR; pwd)/bin/python$LONG \"\$@\"" >> $LOCAL_PYTHON_BIN - chmod +x $LOCAL_PYTHON_BIN - - symlink $PIP_BIN $LOCAL_PIP_BIN - symlink $PYTHON_DIR/bin/doit $LOCAL_DOIT_BIN - - fi -} - -install_python 3.8 -install_python 3.9 |
