public

Build Python without OSX Tkinter Framework auto detection

  • Download Gist
python_setup_NO_tkinter-framework.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
diff --git a/setup.py b/setup.py
index 6b47451..51cc779 100644
--- a/setup.py
+++ b/setup.py
@@ -1702,9 +1702,9 @@ class PyBuildExt(build_ext):
# 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
- self.detect_tkinter_darwin(inc_dirs, lib_dirs)):
- return
+ # if (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
@@ -1793,6 +1793,8 @@ class PyBuildExt(build_ext):
if platform != "cygwin":
libs.append('X11')
+ include_dirs.append("/usr/local/include")
+ added_lib_dirs.append("/usr/local/lib")
ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
define_macros=[('WITH_APPINIT', 1)] + defs,
include_dirs = include_dirs,

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.