if sys.platform == 'win32': from distutils.command.build_ext import build_ext # mingw32distutils is optional. But we need the mingw32 compiler(s). try: # Allow the choice between Win32 GUI and console DLLs. import mingw32distutils except ImportError: mingw32_compilers = ['ming32'] else: mingw32_compilers = mingw32distutils.compilers if sys.version_info < (2, 4): try: import config # a separate method for finding dlls with mingw. if config.is_msys_mingw(): # fix up the paths for msys compiling. import distutils_mods distutils.cygwinccompiler.Mingw32 = distutils_mods.mingcomp except ImportError: pass #add dependency DLLs to the project lib_dependencies = {} for e in extensions: if e.name.startswith('COPYLIB_'): lib_dependencies[e.name[8:]] = e.libraries def dependencies(roots): """Return a set of dependencies for the list of library file roots