--- setup.py.orig 2018-02-05 10:40:56.000000000 +1100
+++ setup.py 2018-02-05 17:38:00.000000000 +1100
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
+disabled_module_list = ["_tkinter", "_gdbm"]
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (after any relative
def detect_modules(self):
- # Ensure that /usr/local is always used, but the local build
- # directories (i.e. '.' and 'Include') must be first. See issue
- if not cross_compiling:
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia
# 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)):
+ # In MacPorts, tkinter is provided by a separate port
+ self.announce("INFO: Not using Tcl/Tk", 2)
# Assume we haven't found any of the libraries or include files
# The versions with dots are used on Unix, and the versions without
if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
- if host_platform == 'darwin':
- # OS X 10.5 comes with libffi.dylib; the include files are
- inc_dirs.append('/usr/include/ffi')
ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
if not ffi_inc or ffi_inc[0] == '':
ffi_inc = find_file('ffi.h', [], inc_dirs)