-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
CMake Find(python) - wrong includes #10393
Comments
This is obviously wrong but I don't know how to tell CMake to unbreak itself. |
Upstream issue. Basically, CMake clings to Frameworks like a drowning sailor on OSX. See the VTK formula for one way of dealing with this. |
Classic. I want that on a T-shirt. |
checking to see if it was boost bottle issue... building from source with homebrew python... Not a boost issue. It is still using Frameworks. |
If I wanted to take this upstream, how could I be sure it's not my software? @Sharpie could you craft me a hello world CMakeLists that looks for FindPythonInterp and FindPythonLibs please? That'd be epic. That Qt one you did was genius. Because this issue would be common to anyone who rolls their own python, is it obvious Kitware is not concerned because PYTHON_INCLUDE_DIR is easily overriden? |
I can always override this I figure. Moving on. |
Why isn't Python built as a framework by default, I wonder? |
I'm not convinced I've got this nailed yet. CMake doesn't always find the correct python includes, even when I built python as a Framework. I'll have to look through about 5 formula that try to locate python in order to determine what they are doing in their find modules. As I mentioned in an earlier post, |
I found this bug: |
If I can make a reproducible testcase of CMake and python headers, I will repopen this. Otherwise it can be overriden and is really upstream like sharpie said. |
When building --HEAD and --with-python, CMake gets confused by multiple python installations, e.g. when both Homebrew and system Pythons exist (see Homebrew#10393 for one example). This patch lifts some hacks from https://github.com/Homebrew/homebrew/blob/51d054c/Library/Formula/opencv.rb to point CMake to the Homebrew Python only, if one exists. N.B. brew test ledger seems to be broken when installed --HEAD for unrelated reasons.
When building --HEAD and --with-python, CMake gets confused by multiple python installations, e.g. when both Homebrew and system Pythons exist (see Homebrew#10393 for one example). This patch lifts some hacks from https://github.com/Homebrew/homebrew/blob/51d054c/Library/Formula/opencv.rb to point CMake to the Homebrew Python only, if one exists and is installed. N.B. brew test ledger seems to be broken when installed --HEAD for unrelated reasons.
When building --HEAD and --with-python, CMake gets confused by multiple python installations, e.g. when both Homebrew and system Pythons exist (see #10393 for one example). This patch lifts some hacks from https://github.com/Homebrew/homebrew/blob/51d054c/Library/Formula/opencv.rb to point CMake to the Homebrew Python only, if one exists and is installed. N.B. brew test ledger seems to be broken when installed --HEAD for unrelated reasons. Closes #27095. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
When building --HEAD and --with-python, CMake gets confused by multiple python installations, e.g. when both Homebrew and system Pythons exist (see Homebrew#10393 for one example). This patch lifts some hacks from https://github.com/Homebrew/homebrew/blob/51d054c/Library/Formula/opencv.rb to point CMake to the Homebrew Python only, if one exists and is installed. N.B. brew test ledger seems to be broken when installed --HEAD for unrelated reasons. Closes Homebrew#27095. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
I'm writing a few new formula. I have Homebrew's python-2.7.2 installed
and in my PATH and PYTHONPATH before the system python.
CMake finds the right libs and binary, but the wrong includes directory:
Is this expected behavior? I know I can pass it something like this if I want to, but still:
The text was updated successfully, but these errors were encountered: