Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PythonPath not set correctly across systems #61

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plans/nest-simulator/2.20.0/default.module
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ setenv NEST_DATA_DIR \$INSTALLDIR/share/nest
setenv NEST_DOC_DIR \$INSTALLDIR/share/doc/nest

# The path where NEST looks for user modules.
setenv NEST_MODULE_PATH \$INSTALLDIR/lib64/nest
setenv NEST_MODULE_PATH [glob -directory \$INSTALLDIR/ -type d lib*/nest/]

# The path where the PyNEST bindings are installed.
setenv NEST_PYTHON_PREFIX \$INSTALLDIR

prepend-path PYTHONPATH \$INSTALLDIR/lib64/
prepend-path PYTHONPATH [glob -directory \$INSTALLDIR/ -type d lib*/python*/site-packages/]
prepend-path PATH \$INSTALLDIR/bin
#prepend-path LD_LIBRARY_PATH \$INSTALLDIR/lib64
#prepend-path MANPATH \$INSTALLDIR/man
Expand Down
4 changes: 2 additions & 2 deletions plans/nest-simulator/2.20.1/default.module
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ setenv NEST_DATA_DIR \$INSTALLDIR/share/nest
setenv NEST_DOC_DIR \$INSTALLDIR/share/doc/nest

# The path where NEST looks for user modules.
setenv NEST_MODULE_PATH \$INSTALLDIR/lib64/nest
setenv NEST_MODULE_PATH [glob -directory \$INSTALLDIR/ -type d lib*/nest/]

# The path where the PyNEST bindings are installed.
setenv NEST_PYTHON_PREFIX \$INSTALLDIR

prepend-path PYTHONPATH \$INSTALLDIR/lib64/
prepend-path PYTHONPATH [glob -directory \$INSTALLDIR/ -type d lib*/python*/site-packages/]
prepend-path PATH \$INSTALLDIR/bin
#prepend-path LD_LIBRARY_PATH \$INSTALLDIR/lib64
#prepend-path MANPATH \$INSTALLDIR/man
Expand Down
4 changes: 2 additions & 2 deletions plans/nest-simulator/3.0/default.module
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ setenv NEST_DATA_DIR \$INSTALLDIR/share/nest
setenv NEST_DOC_DIR \$INSTALLDIR/share/doc/nest

# The path where NEST looks for user modules.
setenv NEST_MODULE_PATH \$INSTALLDIR/lib64/nest
setenv NEST_MODULE_PATH [glob -directory \$INSTALLDIR/ -type d lib*/nest/]

# The path where the PyNEST bindings are installed.
setenv NEST_PYTHON_PREFIX \$INSTALLDIR

prepend-path PYTHONPATH \$INSTALLDIR/lib64/
prepend-path PYTHONPATH [glob -directory \$INSTALLDIR/ -type d lib*/python*/site-packages/]
prepend-path PATH \$INSTALLDIR/bin
#prepend-path LD_LIBRARY_PATH \$INSTALLDIR/lib64
#prepend-path MANPATH \$INSTALLDIR/man
Expand Down
4 changes: 2 additions & 2 deletions plans/nest-simulator/3.1/default.module
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ setenv NEST_DATA_DIR \$INSTALLDIR/share/nest
setenv NEST_DOC_DIR \$INSTALLDIR/share/doc/nest

# The path where NEST looks for user modules.
setenv NEST_MODULE_PATH \$INSTALLDIR/lib64/nest
setenv NEST_MODULE_PATH [glob -directory \$INSTALLDIR/ -type d lib*/nest/]

# The path where the PyNEST bindings are installed.
setenv NEST_PYTHON_PREFIX \$INSTALLDIR

prepend-path PYTHONPATH \$INSTALLDIR/lib64/
prepend-path PYTHONPATH [glob -directory \$INSTALLDIR/ -type d lib*/python*/site-packages/]
prepend-path PATH \$INSTALLDIR/bin
#prepend-path LD_LIBRARY_PATH \$INSTALLDIR/lib64
#prepend-path MANPATH \$INSTALLDIR/man
Expand Down
6 changes: 0 additions & 6 deletions plans/nest-simulator/common
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ module_install () {
#-e "s%\${\?PYTHON_SITEPKG}\?%$PYTHON_SITEPKG%g" \
fi

if [[ "${CMAKEFLAGS}" == *"python=ON"* ]]; then
PYTHON_SITEPKG="$(python -c "import sysconfig; from pathlib import Path; print(Path(sysconfig.get_path('purelib')).relative_to(sysconfig.get_path('data')))")"
PYTHON_SITEPKG=${PYTHON_SITEPKG#"lib/"}
sed -i "s|.*PYTHONPATH.*|&$PYTHON_SITEPKG|" "$module_path"
fi

if ! echo "${MODULEPATH:-}" | grep "${MODULE_INSTALL_PATH}" >/dev/null; then
log_info ">>>"
log_info ">>> Info: MODULE_INSTALL_PATH is not in your MODULEPATH"
Expand Down
4 changes: 2 additions & 2 deletions plans/nest-simulator/master/default.module
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ setenv NEST_DATA_DIR \$INSTALLDIR/share/nest
setenv NEST_DOC_DIR \$INSTALLDIR/share/doc/nest

# The path where NEST looks for user modules.
setenv NEST_MODULE_PATH \$INSTALLDIR/lib64/nest
setenv NEST_MODULE_PATH [glob -directory \$INSTALLDIR/ -type d lib*/nest/]

# The path where the PyNEST bindings are installed.
setenv NEST_PYTHON_PREFIX \$INSTALLDIR

prepend-path PYTHONPATH \$INSTALLDIR/lib64/
prepend-path PYTHONPATH [glob -directory \$INSTALLDIR/ -type d lib*/python*/site-packages/]
prepend-path PATH \$INSTALLDIR/bin
#prepend-path LD_LIBRARY_PATH \$INSTALLDIR/lib64
#prepend-path MANPATH \$INSTALLDIR/man
Expand Down