-
Notifications
You must be signed in to change notification settings - Fork 372
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
Conversation
Co-authored-by: clinssen <[email protected]>
Co-authored-by: clinssen <[email protected]>
This PR removes
The same goes for some of the other variables that would disappear. What to do with this code—should it be systematically removed? |
Good catch! Can you please also point me to the other places in the code for the other variables? I'll check what can be do about this. |
Sure! More systematically: Variables to be removed:
Files affected:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clinssen: I've investigated some more. Please find my assessment for usage of the different variables as inline comments below. Please let me know what you think!
This commit removes the possibility to set NEST_DOC_DIR as this did more harm than good. All uses of the variable have been replaced by appropriate queries to the NEST kernel. It also removes the ancient data reading example for SLI, which used the variable to find an example file.
This commit removes the possibility to set NEST_DATA_DIR as this did more harm than good. All uses of the variable have also been removed. It also renames slihomepath to a more appropriate slilibdir.
@heplesser: apparently I have overlooked that #1587 also removed the possibility to run our custom PyNEST test harness (which I think is a good thing!). I have thus removed If you prefer the perfectly clean solution, I can cherry-pick that commit to another branch, remove it from this one and file an additional PR. |
62c1f17
to
157426d
Compare
On second thought, I came to the conclusion that it's probably really better to create another PR to clean up the PyNEST testsuite. I have thus removed 62c1f17 from the history of this branch. As if it never happened. Sorry for the noise! |
8fa9d33
to
157426d
Compare
@heplesser: no worries and sorry for the confusion. I leave this now for a re-review. |
Thanks @jougs, I am still happy 👍. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting the following on make installcheck
:
Phase 8: Running C++ tests (experimental)
-----------------------------------------
Not running C++ tests because NEST was compiled without Boost.
Traceback (most recent call last):
File "/home/archels/nest-simulator-fork-unpollute-environment-build/share/nest/extras/summarize_tests.py", line 30, in <module>
import junitparser as jp
ImportError: No module named 'junitparser'
CMakeFiles/installcheck.dir/build.make:57: recipe for target 'CMakeFiles/installcheck' failed
# Make nest/sli/... executables visible. | ||
export PATH="${NEST_INSTALL_DIR}/bin:${PATH}" | ||
# Make NEST executables available by prepending their path to PATH. | ||
export PATH="@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@:${PATH}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jochen, I fully trust your definition of "reasonable", it's just that I wouldn't trust this in the general case!
@clinssen Since the transition to the new test summary generator, the testsuite requires the Python |
This PR should also update the description of nest_vars.sh on the installation instructions page: https://github.com/nest/nest-simulator/blob/master/doc/installation/linux_install.rst#environment-variables |
@clinssen: I've addressed all your comments in my recent commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers!
@heplesser: would you click the button? I have more in the pipeline :-) |
@heplesser: sorry for converting to draft again. I have found a problem with custom module loading. A fix for that should still go into this one. |
The problem mentioned earlier was that with this PR in place dynamic modules were again not found without manually setting environment variables. The reason was that this PR removes the setting of It turned out that paths defined in 0c39c0a now fixes the problem by adding the library installation directory to the search path for the dynamic loader. This now means that in a default situation, everything just works. If users decide to install their custom extension modules to non-standard directories, they can still set Can you please have another look? |
This fixes #1586 and fixes #1331 by
NEST_DOC_DIR
andNEST_DATA_DIR
fromSLIStartup
NEST_DOC_DIR
,NEST_DATA_DIR
andNEST_INSTALL_DIR
fromnest_vars.sh
andNEST_DOC_DIR
,NEST_DATA_DIR
andNEST_INSTALL_DIR
in PyNEST anddo_tests.py
by code achieving the same based on entries in the kernel status dictionaryAlong the way, I've
ReadData
example for SLI andslihomepath
toslilibdir
inSLIStartup
.See the discussion in #1586 for more details.