Python 2/3: add effective_include

This commit is contained in:
Adam Vandenberg 2012-02-25 17:12:54 -08:00
parent f2c1d23b42
commit 50fedba5b1
2 changed files with 16 additions and 0 deletions

View file

@ -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"

View file

@ -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"