From 8b92e8a5015ed7e6ab4a0fd79c41841b1de51b29 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Wed, 26 Feb 2014 20:32:53 -0800 Subject: python3: use Formula[] --- Library/Formula/python3.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Library/Formula/python3.rb') diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb index 4c633c761..9d1ed493d 100644 --- a/Library/Formula/python3.rb +++ b/Library/Formula/python3.rb @@ -99,8 +99,9 @@ class Python3 < Formula end if build.with? 'brewed-tk' - ENV.append 'CPPFLAGS', "-I#{Formula.factory('tcl-tk').opt_prefix}/include" - ENV.append 'LDFLAGS', "-L#{Formula.factory('tcl-tk').opt_prefix}/lib" + tcl_tk = Formula["tcl-tk"].opt_prefix + ENV.append 'CPPFLAGS', "-I#{tcl_tk}/include" + ENV.append 'LDFLAGS', "-L#{tcl_tk}/lib" end system "./configure", *args @@ -174,8 +175,9 @@ class Python3 < Formula def distutils_fix_superenv(args) # To allow certain Python bindings to find brewed software (and sqlite): - 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" + sqlite = Formula["sqlite"].opt_prefix + cflags = "CFLAGS=-I#{HOMEBREW_PREFIX}/include -I#{sqlite}/include" + ldflags = "LDFLAGS=-L#{HOMEBREW_PREFIX}/lib -L#{sqlite}/lib" unless MacOS::CLT.installed? # Help Python's build system (setuptools/pip) to build things on Xcode-only systems # The setup.py looks at "-isysroot" to get the sysroot (and not at --sysroot) -- cgit v1.2.3