Permalink
Browse files

tweak tk patch for python 2.7.4

  • Loading branch information...
1 parent 56d86e0 commit 0b19760c12cd65596119fedb2306c011abf17025 @asparagui committed Apr 7, 2013
Showing with 13 additions and 11 deletions.
  1. +13 −11 Library/Formula/python.rb
View
24 Library/Formula/python.rb
@@ -272,21 +272,22 @@ def test
__END__
diff --git a/setup.py b/setup.py
-index 6b47451..36bc81d 100644
+index ea8a5f5..0a001f9 100644
--- a/setup.py
+++ b/setup.py
-@@ -1702,9 +1702,6 @@ class PyBuildExt(build_ext):
+@@ -1809,9 +1809,7 @@ class PyBuildExt(build_ext):
+ # Rather than complicate the code below, detecting and building
# AquaTk is a separate method. Only one Tkinter will be built on
# Darwin - either AquaTk, if it is found, or X11 based Tk.
- platform = self.get_platform()
-- if (platform == 'darwin' and
+- if (host_platform == 'darwin' and
- self.detect_tkinter_darwin(inc_dirs, lib_dirs)):
- return
++
# Assume we haven't found any of the libraries or include files
# The versions with dots are used on Unix, and the versions without
-@@ -1754,17 +1751,6 @@ class PyBuildExt(build_ext):
- if platform == 'sunos5':
+@@ -1861,17 +1859,7 @@ class PyBuildExt(build_ext):
+ if host_platform == 'sunos5':
include_dirs.append('/usr/openwin/include')
added_lib_dirs.append('/usr/openwin/lib')
- elif os.path.exists('/usr/X11R6/include'):
@@ -300,17 +301,18 @@ def test
- # Assume default location for X11
- include_dirs.append('/usr/X11/include')
- added_lib_dirs.append('/usr/X11/lib')
++
# If Cygwin, then verify that X is installed before proceeding
- if platform == 'cygwin':
-@@ -1790,8 +1776,8 @@ class PyBuildExt(build_ext):
+ if host_platform == 'cygwin':
+@@ -1897,8 +1885,8 @@ class PyBuildExt(build_ext):
libs.append('ld')
# Finally, link with the X11 libraries (not appropriate on cygwin)
-- if platform != "cygwin":
+- if host_platform != "cygwin":
- libs.append('X11')
-+ # if platform != "cygwin":
-+ # libs.append('X11')
++ # if host_platform != "cygwin":
++ # libs.append('X11')
ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
define_macros=[('WITH_APPINIT', 1)] + defs,

0 comments on commit 0b19760

Please sign in to comment.