Roumen Petrov <[EMAIL PROTECTED]> added the comment: May be check for compiler.compiler_type (from sysconfig.py ) has to be replaced with a check for descendant classes of UnixCCompiler, i.e. to include mingw32 too ?
Also CygwinCCompiler __init__ has to be reviewed too. As example : ------------- # Hard-code GCC because that's what this is all about. # XXX optimization, warnings etc. should be customizable. self.set_executables(compiler='gcc -mcygwin -O -Wall', ..... ------------- May override in unexpected way settings from customize_compiler. I thin that proposed modification in sysconfig.py with removing(or replacing) of self.set_executables from CygwinCCompiler __init__ will help me for issue3871 (cross building python for mingw32 with distutils). As example I will remove a hack in the setup.py: ----------------------- @@ -196,8 +196,26 @@ if compiler is not None: (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags + + # FIXME: Is next correct ? + # To link modules we need LDSHARED passed to setup.py otherwise + # distutils will use linker from build system if cross-compiling. + linker_so = os.environ.get('LDSHARED') + if linker_so is not None: + args['linker_so'] = linker_so + self.compiler.set_executables(**args) ----------------------- Thanks to Hirokazu who point me, in an another thread, that cygwin build don't use CygwinCCompiler. ---------- nosy: +rpetrov _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2445> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com