shiboken: recommend opt paths in build helpers

Shiboken asks other packages to use Cellar paths to Python's include
path. Make sure it uses the opt path instead.

Closes Homebrew/homebrew#34893, resolves Homebrew/homebrew#34783.
This commit is contained in:
Tim D. Smith 2014-12-11 09:07:32 -08:00
parent 7dd7c74cd9
commit 08bb048d6d

View file

@ -29,11 +29,11 @@ class Shiboken < Formula
# Building the tests also runs them.
args << "-DBUILD_TESTS=ON"
# if not System Python
python_framework = "#{Formula[python].prefix}/Frameworks/Python.framework/Versions/#{version}"
python_framework = "#{Formula[python].opt_prefix}/Frameworks/Python.framework/Versions/#{version}"
if version.to_s[0,1] == "2" && Formula["python"].installed?
args << "-DPYTHON_INCLUDE_DIR:PATH=#{python_framework}/Headers"
args << "-DPYTHON_LIBRARY:FILEPATH=#{python_framework}/lib/libpython#{version}.dylib"
elsif version.to_s[0,1] == "3"
elsif version.to_s[0,1] == "3" && Formula["python3"].installed?
args << "-DPYTHON3_INCLUDE_DIR:PATH=#{python_framework}/Headers"
args << "-DPYTHON3_LIBRARY:FILEPATH=#{python_framework}/lib/libpython#{version}.dylib"
args << "-DUSE_PYTHON3:BOOL=ON"