diff options
| author | Adam Vandenberg | 2014-02-25 07:28:10 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2014-02-27 08:21:20 -0800 |
| commit | a2a09904dd7b76194f761de6363214d56a21714d (patch) | |
| tree | c863e4ec9201eaf92c98ee92d71bef249a00cae1 /Library/Formula/python.rb | |
| parent | 0554960a0b5af975b4b5b1af9c214fb9ddea0f16 (diff) | |
| download | homebrew-a2a09904dd7b76194f761de6363214d56a21714d.tar.bz2 | |
python: use Formula[]
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 |
