New submission from Dirkjan Ochtman <dirk...@ochtman.nl>: distutils incorrectly handles CFLAGS as 1 argument instead of space-separated list of arguments. distutils should respect environment variables, which set compiler, linker etc.
--- Lib/distutils/unixccompiler.py +++ Lib/distutils/unixccompiler.py @@ -297,7 +297,7 @@ # this time, there's no way to determine this information from # the configuration data stored in the Python installation, so # we use this hack. - compiler = os.path.basename(sysconfig.get_config_var("CC")) + compiler = os.path.basename(self.compiler[0]) if sys.platform[:6] == "darwin": # MacOSX's linker doesn't understand the -R flag at all return "-L" + dir Patch was created by Arfrever Frehtes Taifersar Arahesis (arfrever....@gmail.com). It was originally written for PyPy, but it seems like it should actually apply to the stdlib. This patch is for 2.7, I'm hoping it could be taken as a bug fix. ---------- messages: 153471 nosy: djc priority: normal severity: normal status: open title: Be more careful about selecting the compiler in distutils _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14030> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com