From a1d5a99d10ce807f4d03c88d8ba8c3388f6d3432 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 27 Feb 2023 10:39:04 +0000 Subject: [PATCH] Install pyenv and poetry using own installers --- Makefile | 14 +++++++++++++- config/fish/conf.d/local_paths.fish | 4 ++-- config/fish/conf.d/pyenv.fish | 1 + packages/python.txt | 7 +++++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a7073042..3abc2e77 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,12 @@ SSH_TARGETS := $(SSH_ITEMS:ssh/%=$(SSH_DIR)/%) LAZY_REPO := https://github.com/folke/lazy.nvim.git LAZY_DIR := $(HOME)/.local/share/nvim/lazy/lazy.nvim +PYENV_INSTALLER := https://pyenv.run +PYENV_DIR := $(if $(PYENV_ROOT), $(PYENV_ROOT), $(HOME)/.pyenv) + +POETRY_INSTALLER := https://install.python-poetry.org +POETRY_DIR := $(HOME)/.local/share/pypoetry + .PHONY: all clean link unlink install uninstall pacman all: link install @@ -23,7 +29,7 @@ unlink: rmdir $(HOME)/.local/share/fonts rmdir $(HOME)/.ssh/sockets -install: $(LAZY_DIR) +install: $(LAZY_DIR) $(PYENV_DIR) $(POETRY_DIR) uninstall: rm -rf $(LAZY_DIR) @@ -39,5 +45,11 @@ $(HOME)/.local/share/fonts: fonts $(LAZY_DIR): git clone --depth 1 $(LAZY_REPO) $@ +$(PYENV_DIR): + curl $(PYENV_INSTALLER) | bash + +$(POETRY_DIR): + curl -sSL $(POETRY_INSTALLER) | python3 - + $(CONFIG_DIR) $(SSH_DIR) $(HOME)/.ssh/sockets: mkdir -p $@ diff --git a/config/fish/conf.d/local_paths.fish b/config/fish/conf.d/local_paths.fish index 1cfef982..b3c29f5d 100644 --- a/config/fish/conf.d/local_paths.fish +++ b/config/fish/conf.d/local_paths.fish @@ -1,6 +1,6 @@ if status is-interactive set -l LOCAL_BIN "$HOME/.local/bin" set -l DOTFILES_BIN "$HOME/.dotfiles/bin" - echo $PATH | grep -i $LOCAL_BIN - > /dev/null 2>&1 || set -gx PATH $PATH $LOCAL_BIN - echo $PATH | grep -i $DOTFILES_BIN - > /dev/null 2>&1 || set -gx PATH $PATH $DOTFILES_BIN + echo $fish_user_paths | grep -i $LOCAL_BIN - > /dev/null 2>&1 || set -g fish_user_paths $fish_user_paths $LOCAL_BIN + echo $fish_user_paths | grep -i $DOTFILES_BIN - > /dev/null 2>&1 || set -g fish_user_paths $fish_user_paths $DOTFILES_BIN end diff --git a/config/fish/conf.d/pyenv.fish b/config/fish/conf.d/pyenv.fish index 8b7e6936..a71ebfc1 100644 --- a/config/fish/conf.d/pyenv.fish +++ b/config/fish/conf.d/pyenv.fish @@ -1,4 +1,5 @@ if status is-interactive set -gx PYENV_ROOT $HOME/.pyenv set -g fish_user_paths $PYENV_ROOT/bin $fish_user_paths + pyenv init - | source end diff --git a/packages/python.txt b/packages/python.txt index 5bcb2009..061741a1 100644 --- a/packages/python.txt +++ b/packages/python.txt @@ -1,6 +1,9 @@ -pyenv python python-pip -python-poetry python-pynvim python-virtualenv +base-devel +openssl +zlib +xz +tk