diff options
Diffstat (limited to 'Library/Formula/python.rb')
| -rw-r--r-- | Library/Formula/python.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index feea76f75..9c59043fe 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -95,8 +95,9 @@ class Python < 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 @@ -175,11 +176,13 @@ class Python < Formula def distutils_fix_superenv(args) # This is not for building python itself but to allow Python's build tools # (pip) to find brewed stuff when installing python packages. - 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" if build.with? 'brewed-tk' - cflags += " -I#{Formula.factory('tcl-tk').opt_prefix}/include" - ldflags += " -L#{Formula.factory('tcl-tk').opt_prefix}/lib" + tcl_tk = Formula["tcl-tk"].opt_prefix + cflags += " -I#{tcl_tk}/include" + ldflags += " -L#{tcl_tk}/lib" end unless MacOS::CLT.installed? # Help Python's build system (setuptools/pip) to build things on Xcode-only systems |
