From 65ab3188217b829a3ecd511136cc88ff3f69d768 Mon Sep 17 00:00:00 2001 From: remy dernat <remy.dernat@univ-montp2.fr> Date: Wed, 16 Jun 2021 14:07:47 +0200 Subject: [PATCH] checking python modulefiles --- envfiles/python/2.7 | 13 +++++++------ envfiles/python/3 | 24 +----------------------- envfiles/python/3.6 | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+), 29 deletions(-) mode change 100644 => 120000 envfiles/python/3 create mode 100644 envfiles/python/3.6 diff --git a/envfiles/python/2.7 b/envfiles/python/2.7 index 9c2080d..38596ae 100644 --- a/envfiles/python/2.7 +++ b/envfiles/python/2.7 @@ -1,6 +1,7 @@ #%Module###################################################################### # # python2.7 modulefile 20160115 +# update: 20210616 # proc ModulesHelp { } { @@ -14,16 +15,16 @@ puts stderr "is added to PATH." set is_module_rm [module-info mode remove] -set PYTHON_LEVEL 2.7 -set PYTHON_CURPATH /opt/python +set PYTHON_LVL 2.7 +set PYTHON_CURPATH /usr/lib/python$PYTHON_LVL set PYTHON_SHARE_LIBS /share/apps/lib/python -setenv PYTHONPATH $PYTHON_CURPATH/lib:$PYTHON_SHARE_LIBS/lib/python$PYTHON_LEVEL/site-packages:$PYTHON_CURPATH/lib/python$PYTHON_LEVEL/site-packages +setenv PYTHONPATH $PYTHON_CURPATH:$PYTHON_CURPATH/plat-x86_64-linux-gnu:$PYTHON_CURPATH/lib-tk:$PYTHON_CURPATH/lib-old:$PYTHON_CURPATH/lib-dynload:/usr/local/lib/python$PYTHON_LVL/dist-packages:$PYTHON_CURPATH/dist-packages:PYTHON_CURPATH/dist-packages/gtk-2.0:$PYTHON_SHARE_LIBS/lib/python$PYTHON_LEVEL/site-packages unset-alias python set-alias python python2.7 -prepend-path PATH $PYTHON_CURPATH/bin/:$PYTHON_SHARE_LIBS/bin -prepend-path LD_LIBRARY_PATH $PYTHON_CURPATH/lib/python$PYTHON_LEVEL -prepend-path MANPATH $PYTHON_CURPATH/share/man +#prepend-path PATH $PYTHON_CURPATH/bin/:$PYTHON_SHARE_LIBS/bin +#prepend-path LD_LIBRARY_PATH $PYTHON_CURPATH/lib/python$PYTHON_LEVEL +#prepend-path MANPATH $PYTHON_CURPATH/share/man append-path PE_PRODUCT_LIST PYTHON2.7 diff --git a/envfiles/python/3 b/envfiles/python/3 deleted file mode 100644 index 2d32ff3..0000000 --- a/envfiles/python/3 +++ /dev/null @@ -1,23 +0,0 @@ -#%Module###################################################################### -# -# python3 system modulefile 20200303 -# - -proc ModulesHelp { } { -puts stderr "This modulefile defines python3 system version" -puts stderr "as the default python version." -puts stderr "The program python3" -puts stderr "is added to PATH." -puts stderr "Please note that this is just a generic python3 version" -puts stderr "and it might change at every system upgrade." -puts stderr "Otherwise, please use pyenv." -} - - -set is_module_rm [module-info mode remove] - -set PYTHON_LEVEL 3 - -append-path PE_PRODUCT_LIST PYTHON.$PYTHON_LEVEL -unset-alias python3 -set-alias python {python3} diff --git a/envfiles/python/3 b/envfiles/python/3 new file mode 120000 index 0000000..3faf9b8 --- /dev/null +++ b/envfiles/python/3 @@ -0,0 +1 @@ +3.6 \ No newline at end of file diff --git a/envfiles/python/3.6 b/envfiles/python/3.6 new file mode 100644 index 0000000..ef6fe1f --- /dev/null +++ b/envfiles/python/3.6 @@ -0,0 +1,22 @@ +#%Module###################################################################### +# +# python3 system modulefile 20200303 +# + +proc ModulesHelp { } { +puts stderr "This modulefile do nothing." +puts stderr "The program python3.6" +puts stderr "is (already) added to PATH." +puts stderr "Please note that this is just a generic python3 version" +puts stderr "and it might change at every system upgrade." +puts stderr "Otherwise, please use pyenv+virtualenv, conda or guix." +} + + +set is_module_rm [module-info mode remove] + +set PYTHON_LEVEL 3.6 + +append-path PE_PRODUCT_LIST PYTHON.$PYTHON_LEVEL +unset-alias python3 +set-alias python {python3} -- GitLab