python: Explicitly add sqlite to cflags/ldflags
Fixes Homebrew/homebrew#15300 because sqlite is keg_only since a few days. Closes Homebrew/homebrew#17120. Signed-off-by: Adam Vandenberg <flangy@gmail.com>master
parent
4c0a33fe0d
commit
5eb71eb481
|
@ -74,8 +74,11 @@ class Python < Formula
|
|||
args << '--without-gcc' if ENV.compiler == :clang
|
||||
args << '--with-dtrace' if build.include? 'with-dtrace'
|
||||
|
||||
if superenv?
|
||||
distutils_fix_superenv(args)
|
||||
else
|
||||
distutils_fix_stdenv
|
||||
end
|
||||
|
||||
if build.universal?
|
||||
ENV.universal_binary
|
||||
|
@ -175,10 +178,9 @@ class Python < Formula
|
|||
end
|
||||
|
||||
def distutils_fix_superenv(args)
|
||||
if superenv?
|
||||
# To allow certain Python bindings to find brewed software:
|
||||
cflags = "CFLAGS=-I#{HOMEBREW_PREFIX}/include"
|
||||
ldflags = "LDFLAGS=-L#{HOMEBREW_PREFIX}/lib"
|
||||
cflags = "CFLAGS=-I#{HOMEBREW_PREFIX}/include -I#{Formula.factory('sqlite').opt_prefix}/include"
|
||||
ldflags = "LDFLAGS=-L#{HOMEBREW_PREFIX}/lib -L#{Formula.factory('sqlite').opt_prefix}/lib"
|
||||
unless MacOS::CLT.installed?
|
||||
# Help Python's build system (distribute/pip) to build things on Xcode-only systems
|
||||
# The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot)
|
||||
|
@ -201,10 +203,8 @@ class Python < Formula
|
|||
"do_readline = self.compiler.find_library_file(lib_dirs, 'readline')",
|
||||
"do_readline = '#{HOMEBREW_PREFIX}/opt/readline/lib/libhistory.dylib'"
|
||||
end
|
||||
end
|
||||
|
||||
def distutils_fix_stdenv()
|
||||
if not superenv?
|
||||
# Python scans all "-I" dirs but not "-isysroot", so we add
|
||||
# the needed includes with "-I" here to avoid this err:
|
||||
# building dbm using ndbm
|
||||
|
@ -227,7 +227,6 @@ class Python < Formula
|
|||
ENV.append_to_cflags '-Qunused-arguments'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def caveats
|
||||
<<-EOS.undent
|
||||
|
|
Loading…
Reference in New Issue