Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
run nosetests with the Python interpreter (2 vs. 3) that was requeste… #984
run nosetests with the Python interpreter (2 vs. 3) that was requested when invoking cmake
I ran into the same problem as #892, that is, nosetests fails because it is run using the system default Python version (in my case, /usr/bin/python -> python2.7), instead of the one that is requested during the installation process (in my case, cmake [...] -Dwith-python=3).
The proposed code tries to extract the requested version from CMakeCache.txt and selects the binary accordingly by invoking "which".
Tested on Linux, but it should work on any system where the "which" utility is available.
Fixed the comments and the check for nosetests availability.
N.B. the with-python check is verbatim from https://github.com/nest/nest-simulator/blob/master/cmake/ProcessOptions.cmake#L341