aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2012-07-24 10:41:09 -0700
committerAdam Vandenberg2012-07-24 10:43:18 -0700
commit7c39fb834592573667d8deffc84ccfd2bbf779a1 (patch)
tree52ca51e96449dce031f3348eddcd1275a50f9643 /Library/Formula/python.rb
parentd16b53a199a0db39079a0b6899dc99d60b4e976b (diff)
downloadhomebrew-7c39fb834592573667d8deffc84ccfd2bbf779a1.tar.bz2
Python: add check for rogue Tk framework
Fixes #11602.
Diffstat (limited to 'Library/Formula/python.rb')
-rw-r--r--Library/Formula/python.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index 80380e53a..3f46e23b2 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -8,6 +8,22 @@ def as_framework?
(self.installed? and File.exists? prefix+"Frameworks/Python.framework") or build_framework?
end
+class TkCheck < Requirement
+ def message; <<-EOS.undent
+ Tk.framework detected in /Library/Frameworks
+ and that can make python builds to fail.
+ https://github.com/mxcl/homebrew/issues/11602
+ EOS
+ end
+
+ def fatal?; false; end
+
+ def satisfied?
+ not File.exist? '/Library/Frameworks/Tk.framework'
+ end
+end
+
+
class Distribute < Formula
url 'http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz'
md5 'ecd75ea629fee6d59d26f88c39b2d291'
@@ -21,8 +37,9 @@ end
class Python < Formula
homepage 'http://www.python.org/'
url 'http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2'
- md5 'c57477edd6d18bd9eeca2f21add73919'
+ sha1 '842c4e2aff3f016feea3c6e992c7fa96e49c9aa0'
+ depends_on TkCheck.new
depends_on 'pkg-config' => :build
depends_on 'readline' => :optional # Prefer over OS X's libedit
depends_on 'sqlite' => :optional # Prefer over OS X's older version