aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSamuel John2013-06-07 17:54:44 +0200
committerSamuel John2013-06-07 17:58:57 +0200
commit5452af7c25df745f784e41e90a544bf522808a78 (patch)
tree5880e6c95ee33c6f964c803d011a8359a8e18367 /Library
parent041e170985c94e628349baa169c578beb29c32b4 (diff)
downloadhomebrew-5452af7c25df745f784e41e90a544bf522808a78.tar.bz2
python: Fix --with-brewed-tk
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/python.rb30
1 files changed, 18 insertions, 12 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index c3ecef322..1404f3b7a 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -94,6 +94,11 @@ class Python < Formula
inreplace "./Lib/_osx_support.py", "compiler_so = list(compiler_so)",
"if isinstance(compiler_so, (str,unicode)): compiler_so = compiler_so.split()"
+ 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"
+ end
+
system "./configure", *args
# HAVE_POLL is "broken" on OS X
@@ -241,24 +246,27 @@ end
__END__
diff --git a/setup.py b/setup.py
-index ea8a5f5..0a001f9 100644
+index 716f08e..66114ef 100644
--- a/setup.py
+++ b/setup.py
-@@ -1809,9 +1809,7 @@ class PyBuildExt(build_ext):
+@@ -1810,9 +1810,6 @@ 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.
- 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
-@@ -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')
+@@ -1858,21 +1855,6 @@ class PyBuildExt(build_ext):
+ if dir not in include_dirs:
+ include_dirs.append(dir)
+
+- # Check for various platform-specific directories
+- if host_platform == 'sunos5':
+- include_dirs.append('/usr/openwin/include')
+- added_lib_dirs.append('/usr/openwin/lib')
- elif os.path.exists('/usr/X11R6/include'):
- include_dirs.append('/usr/X11R6/include')
- added_lib_dirs.append('/usr/X11R6/lib64')
@@ -270,18 +278,16 @@ index ea8a5f5..0a001f9 100644
- # 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 host_platform == 'cygwin':
-@@ -1897,8 +1885,8 @@ class PyBuildExt(build_ext):
+@@ -1897,9 +1879,6 @@ class PyBuildExt(build_ext):
+ if host_platform in ['aix3', 'aix4']:
libs.append('ld')
- # Finally, link with the X11 libraries (not appropriate on cygwin)
+- # Finally, link with the X11 libraries (not appropriate on cygwin)
- if host_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,