From 87d890c75adb4b0b5daaefdf9090e989fdaa4715 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 3 Mar 2023 17:36:15 +0000 Subject: [PATCH] Add pipx installer script, make direnv script executable --- packages/direnv.sh | 0 packages/pipx.sh | 20 ++++++++++++++++++++ packages/pyenv.sh | 2 ++ packages/python.txt | 9 --------- 4 files changed, 22 insertions(+), 9 deletions(-) mode change 100644 => 100755 packages/direnv.sh create mode 100755 packages/pipx.sh delete mode 100644 packages/python.txt diff --git a/packages/direnv.sh b/packages/direnv.sh old mode 100644 new mode 100755 diff --git a/packages/pipx.sh b/packages/pipx.sh new file mode 100755 index 00000000..8380e26b --- /dev/null +++ b/packages/pipx.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +command -v python3 > /dev/null || { + echo "python3 executable not found, exiting" + return 1 +} + +python3 -c "import sys; assert sys.version_info[0] >= 3 and sys.version_info[1] >= 7" || { + echo python3 --version + echo "python version too old, requires >=3.7" + return 1 +} + +USERSITE=$(python3 -c "import site; print(site._get_path(site._getuserbase()))") +mkdir -p $USERSITE + +if [[ ! -e "$USERSITE/pipx" ]] +then + python3 -m pip install --user pipx +fi diff --git a/packages/pyenv.sh b/packages/pyenv.sh index bf94140f..5d794dcc 100755 --- a/packages/pyenv.sh +++ b/packages/pyenv.sh @@ -10,3 +10,5 @@ index_main() { } index_main +echo "suggested install to build python:\ + base-devel openssl zlib xz tk" diff --git a/packages/python.txt b/packages/python.txt deleted file mode 100644 index 061741a1..00000000 --- a/packages/python.txt +++ /dev/null @@ -1,9 +0,0 @@ -python -python-pip -python-pynvim -python-virtualenv -base-devel -openssl -zlib -xz -tk