Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Fixes to get Python working. #110

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Library/Formula/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ def distutils_fix_stdenv
# the needed includes with "-I" here to avoid this err:
# building dbm using ndbm
# error: /usr/include/zlib.h: No such file or directory
ENV.append "CPPFLAGS", "-I#{MacOS.sdk_path}/usr/include" unless MacOS::CLT.installed?
if OS.mac?
ENV.append "CPPFLAGS", "-I#{MacOS.sdk_path}/usr/include" unless MacOS::CLT.installed?
end

# Don't use optimizations other than "-Os" here, because Python's distutils
# remembers (hint: `python-config --cflags`) and reuses them for C
Expand Down
8 changes: 6 additions & 2 deletions Library/Homebrew/extend/ENV/std.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,15 @@ def macosxsdk version=MacOS.version

def minimal_optimization
set_cflags "-Os #{SAFE_CFLAGS_FLAGS}"
macosxsdk unless MacOS::CLT.installed?
if OS.mac?
macosxsdk unless MacOS::CLT.installed?
end
end
def no_optimization
set_cflags SAFE_CFLAGS_FLAGS
macosxsdk unless MacOS::CLT.installed?
if OS.mac?
macosxsdk unless MacOS::CLT.installed?
end
end

# Some configure scripts won't find libxml2 without help
Expand Down