From 50fedba5b1691cccc3123d610403118d12f5aae0 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 25 Feb 2012 17:12:54 -0800 Subject: [PATCH] Python 2/3: add effective_include --- Formula/python.rb | 8 ++++++++ Formula/python3.rb | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/Formula/python.rb b/Formula/python.rb index 38ca7ad2e3..653a273133 100644 --- a/Formula/python.rb +++ b/Formula/python.rb @@ -148,6 +148,14 @@ class Python < Formula return lib end + # include folder,taking into account whether we are a Framework build or not + def effective_include + # If we're installed or installing as a Framework, then use that location. + return prefix+"Frameworks/Python.framework/Versions/2.7/include" if as_framework? + # Otherwise use just 'include' + return include + end + # The Cellar location of site-packages def site_packages effective_lib+"python2.7/site-packages" diff --git a/Formula/python3.rb b/Formula/python3.rb index 582cef9e2f..9021371f17 100644 --- a/Formula/python3.rb +++ b/Formula/python3.rb @@ -154,6 +154,14 @@ class Python3 < Formula return lib end + # include folder,taking into account whether we are a Framework build or not + def effective_include + # If we're installed or installing as a Framework, then use that location. + return prefix+"Frameworks/Python.framework/Versions/3.2/include" if as_framework? + # Otherwise use just 'include' + return include + end + # The Cellar location of site-packages def site_packages effective_lib+"python3.2/site-packages"