Move all shared into this new repo
This commit is contained in:
14
code/pyenv/files/bin/pyenv-fix-permissions.sh
Executable file
14
code/pyenv/files/bin/pyenv-fix-permissions.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Fixes pyenv permissions after installing new versions
|
||||
# Even though I setfacl specifically on this dir, installing new versions
|
||||
# forces a mask on the pyenv/versions/xyz folder, so this script fixes that
|
||||
# and forces permissions back to my standard
|
||||
# mReschke 2019-04-19
|
||||
|
||||
path=/usr/local/lib/pyenv
|
||||
chown toor:staff $path -R
|
||||
chmod 2775 $path
|
||||
find $path -type d -exec chmod 2775 {} \;
|
||||
setfacl -R -d -m user::rwx,group::rwx $path
|
||||
|
||||
19
code/pyenv/files/profile.d/pyenv.sh
Normal file
19
code/pyenv/files/profile.d/pyenv.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
# Pyenv location
|
||||
pyenv=/usr/local/lib/pyenv
|
||||
export PYENV_ROOT=$pyenv
|
||||
|
||||
# Makes pipenv obey global or local pyenv!
|
||||
PIPENV_PYTHON=$pyenv/shims/python
|
||||
|
||||
PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
# Python penv, must be AFTER $PATH is set as it changes it
|
||||
if command -v pyenv 1>/dev/null 2>&1; then
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
|
||||
|
||||
# Python aliases
|
||||
alias pv='echo "Version:" && python --version && echo && echo "Interpreter Path:" && python -c "import sys;print(sys.prefix)" && echo && echo "Paths:" && python -c "import sys;print(sys.path);"'
|
||||
alias activate='source env/bin/activate && pv'
|
||||
alias pips='pipenv shell && echo "pipenv shell has been deactivated" && echo && pv'
|
||||
Reference in New Issue
Block a user