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

Prevent Python version mix and introduce NEST build option -Dwith-python=ON/OFF/2/3 #452

Merged
merged 7 commits into from Aug 17, 2016

Conversation

@gtrensch
Copy link
Collaborator

gtrensch commented Aug 5, 2016

Proposed solution / workaround for issue #412.

@apeyser please can you have a look at it ?

gtr added 3 commits Aug 5, 2016
…nd Python libraries

           - introduce CMake build option "-Dwith-python3=ON"
gtr
@apeyser
Copy link
Contributor

apeyser commented Aug 11, 2016

Maybe an error if python3 == ON but python == OFF ? Or maybe we should just assume that people know what they're doing, since we may want to switch the default from python2 to python3 at some point, and such an error check would then make code complex.

So: 👍

… '-Dwith-python'-option 'path/to/python'; add new '-Dwith-python'-options 2 and 3 to set a specific python version
@gtrensch
Copy link
Collaborator Author

gtrensch commented Aug 16, 2016

@apeyser: I removed the "path/to/python" option from "-Dwith-python". This is not sufficient anyway. It is much better to set all cmake built-in variables required for Python. I have described this in INSTALL. I also removed the "-Dwith-python3" cmake argument again. Instead of "path/to/python" a specific version can now be set with "-Dwith-python=ON/2/3/OFF". ON is the default. In that case cmake will chose a Python version (usually 2, the lowest installed). The cmake script ensures that all Python components are of exact same version. There is also a parameter check now.

@gtrensch gtrensch changed the title Prevent Python version mix and introduce NEST build option -Dwith-python3=ON/OFF Prevent Python version mix and introduce NEST build option -Dwith-python=ON/OFF/2/3 Aug 16, 2016
INSTALL Outdated
as an argument to `cmake`.

`cmake` usually autodetects your Python installation.
In some cases `cmake` v2.8.12 might not be able to localize the Python interpreter

This comment has been minimized.

Copy link
@jougs

jougs Aug 16, 2016

Contributor

Do we need the version number here, i.e. are we sure that the problem only happens with this exact version? I think the sentence is just as clear without the version.

This comment has been minimized.

Copy link
@apeyser

apeyser Aug 17, 2016

Contributor

Isn't it cmake < 3.4?

@@ -21,6 +21,14 @@ PyNEST to `$(pyexecdir)`, which is often expanded as follows:

$(prefix)/lib{,64}/pythonX.Y/site-packages/nest


To force to usage of a specific Python version pass

This comment has been minimized.

Copy link
@jougs

jougs Aug 16, 2016

Contributor

"force to" → "force the"

@jougs
Copy link
Contributor

jougs commented Aug 16, 2016

👍 after fixing my minor comments. Many thanks for this contribution!

gtr
@apeyser
Copy link
Contributor

apeyser commented Aug 17, 2016

Discussed w/ @gtrensch 👍
Just confirm that the install is correct in saying cmake == 2.8.12, or is a cmake < 3.4

@gtrensch
Copy link
Collaborator Author

gtrensch commented Aug 17, 2016

Version number removed to "be on the safe side".

@jougs
Copy link
Contributor

jougs commented Aug 17, 2016

This fixes #412.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.