Skip to content

Instantly share code, notes, and snippets.

@derekbrokeit
Created December 17, 2012 07:47
Show Gist options
  • Save derekbrokeit/4316490 to your computer and use it in GitHub Desktop.
Save derekbrokeit/4316490 to your computer and use it in GitHub Desktop.
diff --git a/setup.py b/setup.py
index 6b47451..0bfca0c 100644
--- a/setup.py
+++ b/setup.py
@@ -620,7 +620,7 @@ class PyBuildExt(build_ext):
missing.extend(['imageop'])
# readline
- do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
+ do_readline = '/usr/local/opt/readline/lib/libhistory.dylib'
readline_termcap_library = ""
curses_library = ""
# Determine if readline is already linked against curses or tinfo.
@@ -1079,7 +1079,7 @@ class PyBuildExt(build_ext):
sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"'))
# Comment this out if you want the sqlite3 module to be able to load extensions.
- sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))
+
if sys.platform == 'darwin':
# In every directory on the search path search for a dynamic
@@ -1696,15 +1696,22 @@ class PyBuildExt(build_ext):
def detect_tkinter(self, inc_dirs, lib_dirs):
+ print
+ print "=-"*20
+ print
+ homey=os.environ["HOME"]
+ with open(homey+"/test-python.log","a") as f:
+ f.write("starting detect_tkinter\n")
+
# The _tkinter module.
# 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
- 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
@@ -1738,6 +1745,14 @@ class PyBuildExt(build_ext):
tcl_includes = find_file('tcl.h', inc_dirs, tcl_include_sub)
tk_includes = find_file('tk.h', inc_dirs, tk_include_sub)
+
+ with open(homey+"/test-python.log","a") as f:
+ f.write( "test 1\n")
+ f.write( "tcllib: %s\n" % tcllib)
+ f.write( "tklib: %s\n" % tklib)
+ f.write( "tcl_includes: %s\n" % tcl_includes)
+ f.write( "tk_includes: %s\n" %tk_includes)
+
if (tcllib is None or tklib is None or
tcl_includes is None or tk_includes is None):
self.announce("INFO: Can't locate Tcl/Tk libs and/or headers", 2)
@@ -1800,6 +1815,14 @@ class PyBuildExt(build_ext):
library_dirs = added_lib_dirs,
)
self.extensions.append(ext)
+ with open(homey+"/test-python.log","a") as f:
+ f.write( "libs: %s\n" % libs)
+ f.write( "added_lib_dirs: %s\n" % added_lib_dirs)
+ f.write( "include_dirs: %s\n" % include_dirs)
+ print
+ print "=-"*20
+ print
+
## # Uncomment these lines if you want to play with xxmodule.c
## ext = Extension('xx', ['xxmodule.c'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment