--- setup.py.orig 2018-02-05 10:40:56.000000000 +1100 +++ setup.py 2018-02-05 17:38:00.000000000 +1100 @@ -43,7 +43,7 @@ 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 @@ -487,12 +487,6 @@ return ['m'] 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 - # 10520. - 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 if cross_compiling: self.add_gcc_paths() @@ -1751,9 +1745,10 @@ # 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 + + # In MacPorts, tkinter is provided by a separate port + self.announce("INFO: Not using Tcl/Tk", 2) + 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 @@ -1989,11 +1984,6 @@ if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"): return - if host_platform == 'darwin': - # OS X 10.5 comes with libffi.dylib; the include files are - # in /usr/include/ffi - 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)