modules: Add python wrap
This commit is contained in:
@@ -18,8 +18,6 @@ export PATH="$HOME/git/esp-open-sdk/xtensa-lx106-elf/bin/:$PATH"
|
|||||||
|
|
||||||
alias dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles.git --work-tree=$HOME"
|
alias dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles.git --work-tree=$HOME"
|
||||||
alias dvim="GIT_WORK_TREE='/home/kuba' GIT_DIR='/home/kuba/.dotfiles.git/' vim"
|
alias dvim="GIT_WORK_TREE='/home/kuba' GIT_DIR='/home/kuba/.dotfiles.git/' vim"
|
||||||
alias pip=pip3
|
|
||||||
alias python=python3
|
|
||||||
|
|
||||||
# Source git prompt
|
# Source git prompt
|
||||||
source_existing ~/scripts/git-prompt.sh
|
source_existing ~/scripts/git-prompt.sh
|
||||||
@@ -27,7 +25,10 @@ source_existing ~/.bash_prompt.kuba
|
|||||||
|
|
||||||
# Source lmod module setup
|
# Source lmod module setup
|
||||||
source_existing /usr/share/lmod/lmod/init/profile
|
source_existing /usr/share/lmod/lmod/init/profile
|
||||||
[ -e /usr/share/lmod/lmod/init/profile ] && module use "$HOME/.modules.kuba/"
|
if [ -e /usr/share/lmod/lmod/init/profile ]; then
|
||||||
|
module use "$HOME/.modules.kuba/"
|
||||||
|
module load python-wrap
|
||||||
|
fi
|
||||||
|
|
||||||
if xhost >& /dev/null ; then
|
if xhost >& /dev/null ; then
|
||||||
# X is running
|
# X is running
|
||||||
|
|||||||
8
.modules.kuba/python-wrap.lua
Normal file
8
.modules.kuba/python-wrap.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
local name = myModuleName()
|
||||||
|
local version = myModuleVersion()
|
||||||
|
local wrapdir = pathJoin("/tmp", name .. version)
|
||||||
|
|
||||||
|
prepend_path("PATH", wrapdir)
|
||||||
|
execute {cmd='mkdir -p ' .. wrapdir, modeA={"load"}}
|
||||||
|
execute {cmd='ln -sf /usr/bin/python3 ' .. pathJoin(wrapdir, "python"), modeA={"load"}}
|
||||||
|
execute {cmd='ln -sf /usr/bin/pip3' .. pathJoin(wrapdir, "pip"), modeA={"load"}}
|
||||||
Reference in New Issue
Block a user