aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/postgres-xc.rb
diff options
context:
space:
mode:
authorMike McQuaid2014-01-04 13:12:54 +0000
committerMike McQuaid2014-01-04 13:35:45 +0000
commit9f90747f35c48dca92a58583f4556081917064ea (patch)
tree0f259175809cccff581193896f08f3a079ce8ced /Library/Formula/postgres-xc.rb
parent50a52906c8ab678a73ad2b99f34a2e5d1d5dd749 (diff)
downloadhomebrew-9f90747f35c48dca92a58583f4556081917064ea.tar.bz2
postgres-xc: cleanup python usage.
Diffstat (limited to 'Library/Formula/postgres-xc.rb')
-rw-r--r--Library/Formula/postgres-xc.rb40
1 files changed, 21 insertions, 19 deletions
diff --git a/Library/Formula/postgres-xc.rb b/Library/Formula/postgres-xc.rb
index 6712aff22..7c914aef9 100644
--- a/Library/Formula/postgres-xc.rb
+++ b/Library/Formula/postgres-xc.rb
@@ -76,25 +76,27 @@ class PostgresXc < Formula
end
def check_python_arch
- # On 64-bit systems, we need to avoid a 32-bit Framework Python.
- if python.framework?
- unless archs_for_command(python.binary).include? :x86_64
- opoo "Detected a framework Python that does not have 64-bit support in:"
- puts <<-EOS.undent
- #{python.prefix}
-
- The configure script seems to prefer this version of Python over any others,
- so you may experience linker problems as described in:
- http://osdir.com/ml/pgsql-general/2009-09/msg00160.html
-
- To fix this issue, you may need to either delete the version of Python
- shown above, or move it out of the way before brewing PostgreSQL.
-
- Note that a framework Python in /Library/Frameworks/Python.framework is
- the "MacPython" version, and not the system-provided version which is in:
- /System/Library/Frameworks/Python.framework
- EOS
- end
+ # On 64-bit systems, we need to look for a 32-bit Framework Python.
+ # The configure script prefers this Python version, and if it doesn't
+ # have 64-bit support then linking will fail.
+ framework_python = Pathname.new "/Library/Frameworks/Python.framework/Versions/Current/Python"
+ return unless framework_python.exist?
+ unless (archs_for_command framework_python).include? :x86_64
+ opoo "Detected a framework Python that does not have 64-bit support in:"
+ puts <<-EOS.undent
+ #{framework_python}
+
+ The configure script seems to prefer this version of Python over any others,
+ so you may experience linker problems as described in:
+ http://osdir.com/ml/pgsql-general/2009-09/msg00160.html
+
+ To fix this issue, you may need to either delete the version of Python
+ shown above, or move it out of the way before brewing PostgreSQL.
+
+ Note that a framework Python in /Library/Frameworks/Python.framework is
+ the "MacPython" version, and not the system-provided version which is in:
+ /System/Library/Frameworks/Python.framework
+ EOS
end
end