Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
python: fix openssl on 10.11
Browse files Browse the repository at this point in the history
Fixes #40516.
  • Loading branch information
tdsmith committed Jun 11, 2015
1 parent 5a35942 commit 80c83ab
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Library/Formula/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ def install
# Avoid linking to libgcc https://code.activestate.com/lists/python-dev/112195/
args << "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}"

# We want our readline! This is just to outsmart the detection code,
# We want our readline and openssl! This is just to outsmart the detection code,
# superenv handles that cc finds includes/libs!
inreplace "setup.py",
"do_readline = self.compiler.find_library_file(lib_dirs, 'readline')",
inreplace "setup.py" do |s|
s.gsub! "do_readline = self.compiler.find_library_file(lib_dirs, 'readline')",
"do_readline = '#{Formula["readline"].opt_lib}/libhistory.dylib'"
s.gsub! "/usr/local/ssl", Formula["openssl"].opt_prefix
end

if build.universal?
ENV.universal_binary
Expand Down Expand Up @@ -215,8 +217,8 @@ def post_install
end

# Help distutils find brewed stuff when building extensions
include_dirs = [HOMEBREW_PREFIX/"include"]
library_dirs = [HOMEBREW_PREFIX/"lib"]
include_dirs = [HOMEBREW_PREFIX/"include", Formula["openssl"].opt_include]
library_dirs = [HOMEBREW_PREFIX/"lib", Formula["openssl"].opt_lib]

if build.with? "sqlite"
include_dirs << Formula["sqlite"].opt_include
Expand Down

0 comments on commit 80c83ab

Please sign in to comment.