posgresql: restore Python arch check
The Python arch check in the Postgres formula was changed to use the new python helper. This was incorrect. We specifically want to check for a 32-bit python located in /Library.
This commit is contained in:
parent
c864a6c959
commit
987ad39659
1 changed files with 16 additions and 17 deletions
|
@ -60,7 +60,7 @@ class Postgresql < Formula
|
|||
ENV.append 'LIBS', `uuid-config --libs`.strip
|
||||
end
|
||||
|
||||
if not build.build_32_bit? and MacOS.prefer_64_bit? and build.with? 'python'
|
||||
if build.with? 'python' and MacOS.prefer_64_bit? and not build.build_32_bit?
|
||||
args << "ARCHFLAGS='-arch x86_64'"
|
||||
check_python_arch
|
||||
end
|
||||
|
@ -75,24 +75,23 @@ class Postgresql < 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}
|
||||
# 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
|
||||
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
|
||||
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.
|
||||
EOS
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue