modules: Add python wrap

This commit is contained in:
2020-02-17 16:43:51 +01:00
parent 129748fd8c
commit 4e0bd16800
2 changed files with 12 additions and 3 deletions

View File

@@ -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 dvim="GIT_WORK_TREE='/home/kuba' GIT_DIR='/home/kuba/.dotfiles.git/' vim"
alias pip=pip3
alias python=python3
# Source git prompt
source_existing ~/scripts/git-prompt.sh
@@ -27,7 +25,10 @@ source_existing ~/.bash_prompt.kuba
# Source lmod module setup
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
# X is running

View 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"}}