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

Clean up handling of path-related environment variables #1578

Merged
merged 33 commits into from
Jul 1, 2020
Merged
Changes from 5 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1dcee7b
Don't export variables that can confuse NEST
jougs May 4, 2020
f1736d6
Fix path for bin dir
jougs May 4, 2020
ba6a4ca
Update extras/nest_vars.sh.in
jougs May 5, 2020
078800b
Update extras/nest_vars.sh.in
jougs May 5, 2020
6c7f863
Update extras/nest_vars.sh.in
jougs May 5, 2020
2463ad9
Merge branch 'master' of github.com:nest/nest-simulator into unpollut…
jougs May 8, 2020
2b535ab
Dynamically determine PyNEST test directory
jougs May 8, 2020
1ea4893
Remove environment variable NEST_DOC_DIR
jougs May 8, 2020
8151175
Remove environment variable NEST_DATA_DIR
jougs May 8, 2020
4800125
Remove environment variable NEST_INSTALL_DIR
jougs May 8, 2020
de0c2b4
Fix formatting
jougs May 8, 2020
b33a74c
Fix quotation of string
jougs May 8, 2020
59c9754
Merge branch 'master' of github.com:nest/nest-simulator into unpollut…
jougs May 12, 2020
5d6958e
Silence remaining RNGManager output. This is a follow-up to #1577.
jougs May 13, 2020
d602811
Beautify message composition
jougs May 13, 2020
9e81cfe
Fix wording of comment
jougs May 13, 2020
b7cf678
Extend and fix explanation for MyModule installation
jougs May 13, 2020
5b64508
Use sli instead of nest to get the basedir for the tests
jougs May 13, 2020
827421c
Update doc/guides/spatial/guide_spatially_structured_networks.rst
jougs May 14, 2020
82448a2
Update doc/guides/spatial/guide_spatially_structured_networks.rst
jougs May 14, 2020
3ead74e
Silence NEST at startup when getting PyNEST path
jougs Jun 16, 2020
480b2c2
Merge branch 'unpollute_environment' of github.com:jougs/nest-simulat…
jougs Jun 16, 2020
5363488
Merge branch 'master' of github.com:nest/nest-simulator into unpollut…
jougs Jun 16, 2020
dc93823
Fix silencing of NEST
jougs Jun 17, 2020
aa25266
Use importlib to find PyNEST path instead of importing it
jougs Jun 17, 2020
157426d
Merge branch 'master' of github.com:nest/nest-simulator into unpollut…
jougs Jun 17, 2020
0947e63
Re-add PYTHON variable accidentally lost in 157426d
jougs Jun 18, 2020
b07c26b
Remove line referencing old installation instructions
jougs Jun 24, 2020
0613b18
Update wrt to removed environment variables
jougs Jun 24, 2020
742e631
Make variable names consistent by removing dollar sign
jougs Jun 24, 2020
adabf1d
Merge branch 'master' of github.com:nest/nest-simulator into unpollut…
jougs Jun 24, 2020
0c39c0a
Add library installation directory to dl search path
jougs Jun 25, 2020
bb5666c
Fix note about module location
jougs Jun 29, 2020
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
27 changes: 10 additions & 17 deletions extras/nest_vars.sh.in
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
#!/bin/sh

# NEST is installed here. When you relocate NEST, change this variable.
export NEST_INSTALL_DIR="@CMAKE_INSTALL_PREFIX@"
jougs marked this conversation as resolved.
Show resolved Hide resolved
# NEST is installed here. When you relocate NEST, change these variables.
NEST_LIB_DIR="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/nest/"
NEST_BIN_DIR="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR/"

# NEST finds standard *.sli files $NEST_DATA_DIR/sli
export NEST_DATA_DIR="${NEST_INSTALL_DIR}/@CMAKE_INSTALL_DATADIR@"
jougs marked this conversation as resolved.
Show resolved Hide resolved

# NEST finds help files $NEST_DOC_DIR/help
export NEST_DOC_DIR="${NEST_INSTALL_DIR}/@CMAKE_INSTALL_DOCDIR@"
jougs marked this conversation as resolved.
Show resolved Hide resolved

# The path in which NEST dynamic libraries are found. Works also if $(DY)LD_LIBRARY_PATH is undefined.
# The path in which NEST dynamic libraries are found.
# Works also if $(DY)LD_LIBRARY_PATH is undefined.
if [[ "$OSTYPE" == "darwin"* ]]; then
export DYLD_LIBRARY_PATH="$NEST_INSTALL_DIR/@CMAKE_INSTALL_LIBDIR@/nest"${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
export DYLD_LIBRARY_PATH="$NEST_LIB_DIR${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="$NEST_INSTALL_DIR/@CMAKE_INSTALL_LIBDIR@/nest"${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export LD_LIBRARY_PATH="$NEST_LIB_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
fi

# The path where the PyNEST bindings are installed.
export NEST_PYTHON_PREFIX="${NEST_INSTALL_DIR}/@PYEXECDIR@"

# Prepend NEST to PYTHONPATH. Works also if $PYTHONPATH is undefined.
export PYTHONPATH="$NEST_PYTHON_PREFIX${PYTHONPATH:+:$PYTHONPATH}"
# Prepend NEST to PYTHONPATH in a safe way.
export PYTHONPATH="@CMAKE_INSTALL_PREFIX@/@PYEXECDIR@${PYTHONPATH:+:$PYTHONPATH}"

# Make nest/sli/... executables visible.
export PATH="${NEST_INSTALL_DIR}/bin:${PATH}"
export PATH="${NEST_BIN_DIR}:${PATH}"