Homebrew/homebrew — pull request #27095 by gadomski (2014-02-28 16:55:08+00:00)
Title: ledger: Find Homebrew Python when building --HEAD

When building --HEAD and --with-python, CMake gets confused by multiple
python installations, e.g. when both Homebrew and system Pythons exist
(see https://github.com/Homebrew/homebrew/issues/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.