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

run nosetests with the Python interpreter (2 vs. 3) that was requeste… #984

Merged
merged 3 commits into from Jul 18, 2018

Conversation

Projects
None yet
4 participants
@clinssen

clinssen commented Jul 12, 2018

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.

@jougs jougs requested a review from hakonsbm Jul 17, 2018

@clinssen

This comment has been minimized.

Show comment
Hide comment
@clinssen

clinssen Jul 17, 2018

Indeed, if we use cmake, the code can be simplified and we no longer need which!

clinssen commented Jul 17, 2018

Indeed, if we use cmake, the code can be simplified and we no longer need which!

@jougs

Thanks for considering my comments. Here's some more!

Show outdated Hide outdated CMakeLists.txt
Show outdated Hide outdated testsuite/do_tests.sh.in
@clinssen

This comment has been minimized.

Show comment
Hide comment
@clinssen

clinssen Jul 18, 2018

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

clinssen commented Jul 18, 2018

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

@jougs

jougs approved these changes Jul 18, 2018

Thanks for the changes and your contribution!

@hakonsbm

Looks good to me!

@jougs jougs merged commit 484f3e1 into nest:master Jul 18, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment