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

Find another solution to find python in cmake #40

Closed
svkurowski opened this issue Oct 28, 2014 · 6 comments
Closed

Find another solution to find python in cmake #40

svkurowski opened this issue Oct 28, 2014 · 6 comments
Labels
area: buildsystem Related to our cmake/python buildsystem os: macos macOS-specific issue upstream issue Issue that can't be fixed by us, but some other project

Comments

@svkurowski
Copy link
Contributor

Finding Python with cmake will not work on OS X if python3 is installed via homebrew.
See the cmake issue, the homebrew issue and #16 . There has not been any activity regarding the cmake issue since April.
An alternative solution is this cmake module. It's licensed under BSD. Details regarding licensing can be found here.
For a temporary fix when using homebrewed python3, use the following to configure the project *you might need to adjust the version):

  --raw-cmake-args \
  -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/include/python3.4m/ \
  -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib \
  -DPython_FRAMEWORKS=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework
@mic-e
Copy link
Member

mic-e commented Oct 28, 2014

To clarify, is this an issue with homebrew, cmake, or both? Not a legal expert, but I don't think including BSD-licensed code poses a problem in any way. I'm more worried about breaking functionality on other platforms.

@svkurowski
Copy link
Contributor Author

It's a cmake issue. The official FindFrameworks and FindPythonLibs modules don't recognize homebrew supplied Frameworks (which get installed to /usr/local/Frameworks/).
And Python is packed as a Framework on OS X.
Additionally FindFrameworks doesn't even allow to specify additional Frameworks folders.

@mic-e mic-e added upstream issue Issue that can't be fixed by us, but some other project area: buildsystem Related to our cmake/python buildsystem os: macos macOS-specific issue labels Oct 28, 2014
@mic-e
Copy link
Member

mic-e commented Oct 28, 2014

Hm... doesn't sound like a fix will be coming soon, then... I vote to include the qgis module.

@mic-e
Copy link
Member

mic-e commented Oct 29, 2014

Note: All sorts of linux distros (mostly ubuntu) seem to have issues with the current way of finding Python as well.

@thehydroimpulse
Copy link

You might also need to add -DPYTHONLIBS_VERSION_STRING=3.4.1 given the recent change.

@TheJJ
Copy link
Member

TheJJ commented Oct 31, 2014

should be fixed by the separate cmake module, if not: reopen pls.

@TheJJ TheJJ closed this as completed Oct 31, 2014
schets added a commit to schets/openage that referenced this issue Nov 12, 2014
See SFTtech#40
Additionally CMake will find Python on OS X now. Fixes SFTtech#16
inakoll added a commit to inakoll/openage that referenced this issue Nov 24, 2014
See SFTtech#40
Additionally CMake will find Python on OS X now. Fixes SFTtech#16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: buildsystem Related to our cmake/python buildsystem os: macos macOS-specific issue upstream issue Issue that can't be fixed by us, but some other project
Projects
None yet
Development

No branches or pull requests

4 participants