From 902d22290b1dfd13742da3d72199641ac4b4f0b4 Mon Sep 17 00:00:00 2001 From: Kyungdahm Yun Date: Fri, 18 Jan 2013 00:01:37 +0900 Subject: Fix PYTHONFRAMEWORKDIR for Xcode with CLT PYTHONFRAMEWORKDIR is now replaced even if CLT is installed. Closes #17144. Signed-off-by: Adam Vandenberg --- Library/Formula/python.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index 39e39f4c8..a56b5d067 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -164,15 +164,16 @@ class Python < Formula install-lib=#{site_packages} EOF - unless MacOS::CLT.installed? - makefile = prefix/'Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile' - inreplace makefile do |s| + makefile = prefix/'Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile' + inreplace makefile do |s| + unless MacOS::CLT.installed? s.gsub!(/^CC=.*$/, "CC=xcrun clang") s.gsub!(/^CXX=.*$/, "CXX=xcrun clang++") s.gsub!(/^AR=.*$/, "AR=xcrun ar") s.gsub!(/^RANLIB=.*$/, "RANLIB=xcrun ranlib") - s.gsub!(/^PYTHONFRAMEWORKDIR=\tPython\.framework/, "PYTHONFRAMEWORKDIR= #{opt_prefix}/Frameworks/Python.framework") end + # Should be fixed regardless of CLT (for `python-config --ldflags`) + s.gsub!(/^PYTHONFRAMEWORKDIR=\tPython\.framework/, "PYTHONFRAMEWORKDIR= #{opt_prefix}/Frameworks/Python.framework") end end -- cgit v1.2.3